Bug 244833 - href tag not captured through cordova plugin with wkwebview in iOS 15
Summary: href tag not captured through cordova plugin with wkwebview in iOS 15
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: Safari 15
Hardware: iPhone / iPad iOS 15
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-09-06 00:27 PDT by krishan vir singh
Modified: 2024-05-29 20:04 PDT (History)
6 users (show)

See Also:


Attachments
Webkit not responding on link (71.70 KB, application/zip)
2022-11-16 20:46 PST, krishan vir singh
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description krishan vir singh 2022-09-06 00:27:16 PDT
Hi Team 

In iOS 14 anchor tag was easily captured through coredova plugin in native iOS side . 

But In iOS 15 the event does not trigger through coredova plugin in native iOS side . 

How can we resolve this for coredova container app .
Comment 1 Alexey Proskuryakov 2022-09-06 17:46:57 PDT
Please have Cordova(?) developers investigate this issue, and come up with an explanation of what's misbehaving in WebKit. We cannot investigate from such a high level description of the problem.
Comment 2 krishan vir singh 2022-09-22 04:42:29 PDT
Hi Alexey Proskuryakov 

Ours is a cordova app but the issue is related to webkit because we use webkit within the app. 
So if we are using an href tag on html page it was working on iOS 14 . It was working as a link and redirecting to the destination page
But after iOS 15 update it stopped working . In our application we are using wkwebview.
Comment 3 Alexey Proskuryakov 2022-09-29 10:48:44 PDT
Understood. I don't think that investigate based on such a high level description, unless it's an already know issue (possibly intentional behavior change). CC'ing some people who would know ab out such.
Comment 4 krishan vir singh 2022-11-16 20:46:12 PST
Created attachment 463571 [details]
Webkit not responding on link
Comment 5 krishan vir singh 2022-11-16 20:46:44 PST
I have attached a demo .
Comment 6 Alexey Proskuryakov 2022-11-16 22:00:37 PST
Reopening, as there is an example attached now. Thank you!
Comment 7 Radar WebKit Bug Importer 2022-11-16 22:00:50 PST
<rdar://problem/102451385>
Comment 8 krishan vir singh 2023-03-06 01:11:14 PST
Hi Team 

Please check this issue on priority . As Our customers are facing issues . 

Thanks & Regards
Krishan Vir Singh
Comment 9 krishan vir singh 2023-03-15 23:24:18 PDT
Hi Team 

please take a look and suggest some solution for this . 

Thanks & Regards
Krishan vir singh
Comment 10 Chris Dumez 2023-08-31 11:59:10 PDT
I am about to start looking into this. Is this still an issue?
I see there are 3 links in the demo app, are all 3 links not working?
Comment 11 Chris Dumez 2023-08-31 13:21:52 PDT
I ran the attached demo app on iOS 17 beta (on iPhone device) and all 3 links open.
2 of them navigate inside the web view and the third one opens the Apple Maps app.

If you can still reproduce the issue on iOS 17 beta, please provide better reproduction steps.
Comment 12 krishan vir singh 2024-04-08 00:05:15 PDT
Then Basically We implmented Rich text editor to add the data . and showing on text editor . In this scenario with our cordova app is not invoking the a herf tag . So It is not opening the link
Comment 13 krishan vir singh 2024-04-08 00:05:25 PDT
Then Basically We implmented Rich text editor to add the data . and showing on text editor . In this scenario with our cordova app is not invoking the a herf tag . So It is not opening the link
Comment 14 krishan vir singh 2024-05-08 01:02:35 PDT
Hi Team,

is there any update on this incident?

Regards
Krishan Vir Sigh
Comment 15 krishan vir singh 2024-05-29 20:04:03 PDT
Hi Team 

I observed one code decide navigation policy 

I am using this code to navigation on click of link from coredova app which is not executing the script 

WKUserScript *script = [[WKUserScript alloc] initWithSource:[NSString stringWithFormat:@"javascript:window.open('%@')", [requestedURL absoluteString]] injectionTime:WKUserScriptInjectionTimeAtDocumentStart forMainFrameOnly:YES];
                
                [webView.configuration.userContentController addUserScript:script];



and when i have this code it is working 


NSString *script = [NSString stringWithFormat:@"javascript:window.open('%@')", [requestedURL absoluteString]];
                [webView evaluateJavaScript:script completionHandler:nil];

So Could you please tell me what is causing the issue ?