Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GH-652] add check for openInSystem postNotification #654

Merged
merged 1 commit into from
Mar 30, 2020

Conversation

j--w
Copy link
Contributor

@j--w j--w commented Mar 25, 2020

Platforms affected

iOS

Motivation and Context

fixes #652

This fix prevents window.handleOpenURL from being triggered by calls to _system browser through InAppBrowser which was previously fixed in UIWebView version of IAB but still exists in WKWebView version

Description

Add if ([[UIApplication sharedApplication] openURL:url] == NO) check in openInSystem method which was present in UIWebView version of IAB but not WKWebView.

Testing

Ran plugintests repo
Manually tested in my own project where I first noticed the issue
Manually tested in minimum reproduction repo and pushed to a branch

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@timbru31
Copy link
Member

Great, thanks for your PR. Code wise it looks good. I'll test your branch later today.

Copy link
Member

@timbru31 timbru31 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@timbru31 timbru31 requested a review from NiklasMerz March 25, 2020 17:33
@timbru31 timbru31 merged commit 11ba4c4 into apache:master Mar 30, 2020
expertanswerz pushed a commit to expertanswerz/cordova-plugin-inappbrowser that referenced this pull request Apr 9, 2020
* master:
  docs: replaces outdated transition and presentation style links (apache#662)
  chore: remove deprecated orientation methods (apache#666)
  Fix incorrect TypeScript typings (apache#515)
  [apacheGH-652] add check for openInSystem postNotification (apache#654)
  ci: updates Node.js versions (apache#659)
  chore(npm): improve ignore list (apache#658)
  fix(android): Reset lefttoright if not set (apache#442)
  [android] Correcting the documentation regarding lefttoright opt… (apache#648)
  (android) Added option to turn on/off fullscreen mode in Android (apache#634)
  Android apacheGH-470 InAppBrowser: java.lang.IllegalArgumentException (apache#616)
  breaking(ios): remove UIWebView (apache#635)
  chore(release): 3.2.1-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

window.handleOpenURL is triggered in WKWebView for system browser calls
4 participants