cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-12497) location.href links are silently disallowed
Date Thu, 23 Feb 2017 01:41:44 GMT

    [ https://issues.apache.org/jira/browse/CB-12497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15879674#comment-15879674
] 

ASF GitHub Bot commented on CB-12497:
-------------------------------------

GitHub user shazron opened a pull request:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/32

    CB-12497 - location.href links are silently disallowed

    ### Platforms affected
    
    iOS WKWebView
    
    ### What does this PR do?
    
    Fixes the bug where javascript navigations were silently disallowed on this plugin.
    
    ### What testing has been done on this change?
    
    Manual testing on device - using a new default project with this plugin, and `<button
onclick="location.href='tel:15551234'">LOCATION.HREF</button>`
    
    ### Checklist
    - [X] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA
database
    - [X] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file
paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
    - [X] Added automated test coverage as appropriate for this change.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/shazron/cordova-plugin-wkwebview-engine CB-12497

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/32.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #32
    
----
commit 604c7754e4eda1e4c50434d11fb08c4de32837e5
Author: Shazron Abdullah <shazron@gmail.com>
Date:   2017-02-23T01:38:01Z

    CB-12497 - location.href links are silently disallowed

----


> location.href links are silently disallowed
> -------------------------------------------
>
>                 Key: CB-12497
>                 URL: https://issues.apache.org/jira/browse/CB-12497
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin WKWebViewEngine
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message