Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11136

InAppBrowser fails to close with WKWebView OAuth

    XMLWordPrintableJSON

    Details

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shazron Shazron Abdullah
                Reporter:
                geojay Geordie Jay
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 3h
                  3h
                  Remaining:
                  Remaining Estimate - 3h
                  3h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified