You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/09/19 20:56:21 UTC

[jira] [Commented] (CB-11136) InAppBrowser fails to close with WKWebView OAuth

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

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

GitHub user manucorporat opened a pull request:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/187

    CB-11136: InAppBrowser fails to close with WKWebView OAuth

    ### Platforms affected
    iOS (device only)
    
    ### What does this PR do?
    Avoids presenting the InAppBrowser directly over the UIViewController used by WKWebView which causes the WKWebView thread to block.
    
    Since the WKWebView thread is blocked it can not receive the some important events like 'loadend', preventing the use of OAuth.
    
    ### What testing has been done on this change?
    Testing in Simulator iOS9.3, Simulator iOS10, Device iOS10
    
    ### Checklist
    - [ ] [ICLA](http://www.apache.org/licenses/icla.txt) has been signed and submitted to secretary@apache.org.
    - [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
    - [ ] 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.
    - [ ] 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/manucorporat/cordova-plugin-inappbrowser master

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

    https://github.com/apache/cordova-plugin-inappbrowser/pull/187.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 #187
    
----
commit ce33cf5ac733854bba8d1b578c2ca58ff23b237b
Author: Manu Mtz.-Almeida <ma...@gmail.com>
Date:   2016-09-19T20:51:08Z

    CB-11136: InAppBrowser fails to close with WKWebView OAuth

----


> InAppBrowser fails to close with WKWebView OAuth 
> -------------------------------------------------
>
>                 Key: CB-11136
>                 URL: https://issues.apache.org/jira/browse/CB-11136
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin InAppBrowser, Plugin WKWebViewEngine
>    Affects Versions: 4.1.0
>         Environment: iOS 8+ with WKWebView
>            Reporter: Geordie Jay
>            Assignee: Shazron Abdullah
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> Launching InAppBrowser from Cordova iOS Platform 4+ with its WKWebView for OAuth (e.g. Facebook or Google login) fails to close as it should.
> The reason is that the entire WKWebView thread seems to pause when another view controller is presented. This can be confirmed by inspecting the WKWebView session in Safari, running `window.open('http://something.com')` and then trying to enter another command into that Safari console.
> I made a hacky but working version of this that animated in the InAppBrowser's view manually, rather than 'presenting' the ViewController in the traditional iOS style. In that instance the WKWebView thread continues as normal and receives the confirmation to close the other InAppBrowser when the OAuth process is complete.
> Maybe there is a better way around this, but at the moment this is a big usability fail for all WKWebView users.
> What do you all think, is the 'not-actually-presenting' way of presenting the InAppBrowser acceptable? Would be happy to make a pull request along these lines if it is.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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