Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
See: https://github.com/apache/cordova-plugin-wkwebview-engine/pull/20#issuecomment-281861506
Ok, for location.href (say in a button tag onclick handler), it's definitely a bug when using wkwebview-engine (UIWebView is fine). For the CDVIntentAndNavigationFilter, we are passing back the navigationType, which is of type [WKNavigationType](https://developer.apple.com/reference/webkit/wknavigationtype). It looks like the enumeration is the same as [UIWebViewNavigationType](https://developer.apple.com/reference/uikit/uiwebviewnavigationtype) (which the filter uses for its logic), but not quite.
All enum integral values are the same for the two enumerations, except for [WKNavigationTypeOther](https://developer.apple.com/reference/webkit/wknavigationtype/1401930-other) which is set to -1 explicitly, while [UIWebViewNavigationTypeOther](https://developer.apple.com/reference/uikit/uiwebviewnavigationtype/1617934-other) is 5.
I'll file an issue to fix this by coercing the value explicitly to UIWebViewNavigationTypeOther when a WKNavigationTypeOther is encountered, before passing it off to the filter.
Attachments
Issue Links
- links to