You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/02/11 22:06:31 UTC

[GitHub] dpa99c opened a new pull request #425: (iOS): Fix iframes in iOS/WKWebview which were broken by #418. Fixes #424.

dpa99c opened a new pull request #425: (iOS): Fix iframes in iOS/WKWebview which were broken by #418. Fixes #424.
URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/425
 
 
   ### Platforms affected
   iOS
   
   
   ### Motivation and Context
   <!-- Why is this change required? What problem does it solve? -->
   <!-- If it fixes an open issue, please link to the issue here. -->
   This fixes iframes in WKWebView implementation for iOS which was broken by PR #418 in its attempt to fix issue #417.
   
   #418 tried to solve the issue of page links with target=_blank not working by redirecting any request which was not targeted at the main frame back to the main frame, based on https://stackoverflow.com/a/25853806/777265.
   
   While this fixed links where target=_blank, it also had the unintended side effect of redirecting iframe requests, causing the target URL to be loaded into the main frame.
   
   ### Description
   <!-- Describe your changes in detail -->
   This PR fixes that by only redirecting requests that don't have a target frame set, i.e. those with a "new window action" aka target=_blank.
   This based on https://stackoverflow.com/a/25713070/777265.
   
   
   ### Testing
   <!-- Please describe in detail how you tested your changes. -->
   The changes have been tested with page links that contain target=_blank (e.g.  https://dpa99c.github.io/cordova-plugin-inappbrowser-test/iab_content/iab.html) and with pages that use iframes (e.g. https://www.trivago.com) to ensure both still work.
   
   There are currently no automated tests that cover this functionality specifically.
   
   ### Checklist
   
   - [ x] I've run the tests to see all new and existing tests pass
   - [x ] I added automated test coverage as appropriate for this change
   - [x ] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`)
   - [x ] 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](https://help.github.com/articles/closing-issues-using-keywords/))
   - [x ] I've updated the documentation if necessary
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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