-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
beforeload event fires only on odd links #686
Comments
I am able to repro this: the I've found a solution which seems to work in this SO answer - adding this seems to resolve the issue and
While MIXED_CONTENT_ALWAYS_ALLOW is not recommended, setting MIXED_CONTENT_COMPATIBILITY_MODE or MIXED_CONTENT_NEVER_ALLOW seems to cause the intermittent failure to invoke |
We looked into that and it did not solve the issue. However, PR#755 does solve it. The code that is modified in that PR seems to be quite old/obsolete and causes the issue reported in this bug. Could any reviewer consider reviewing it? Thanks! |
… in apache#686 The waitForBeforeload flag was preventing beforeLoad from being called on every GET request.
…ty (#42) * Fix memory leak - initially reported in apache#290 Whenever closing an InAppBrowser instance, a webview was left in memory with about:blank page. This change fixes the issue by destroying and freeing the inAppWebView object. * Fix beforeLoad not being called in some requests - initially reported in apache#686 The waitForBeforeload flag was preventing beforeLoad from being called on every GET request. * Do not lose callbackContext when opening a SYSTEM url This fixes a condition where it was not possible to open a SYSTEM url while an InAppBrowser instance is displayed. The callbackContext of the InAppBrowser instance was lost when the SYSTEM url was opened. This fixes the issue by not setting the callbackContext on SYSTEM urls. * Fix crash when pausing/resuming application after closing InAppBrowser * Fix _loadAfterBeforeload callback not working due to this.rootName not being defined. * Reset beforeload variable if a new instance of InAppBrowser is opened without beforeload setting * chore: update changelog References: https://outsystemsrd.atlassian.net/browse/RMET-2802 * refactor: remove empty lines * refactor: use ternary operator and remove unnecessary ones Why: We can refactor the if-else block that assigns a value to beforeload to use a ternary operator. On the other hand, we can remove the unnecessary ternary operators used to assign a boolean value. They are redundant. References: https://outsystemsrd.atlassian.net/browse/RMET-2802 --------- Co-authored-by: Leonardo Monteiro Fernandes <leonardo.monteiro.fernandes@gmail.com> Co-authored-by: Nelson Lopes Silva <5671236+nflsilva@users.noreply.github.com>
* RMET-2119 InAppBrowser Plugin - Check for element before obtaining it (#40) * fix: check if there's a next token before trying to obtain it References: https://outsystemsrd.atlassian.net/browse/RMET-2119 * chore: update changelog * RMET-2802 InAppBrowser Plugin - Multiple minor fixes from the community (#42) * Fix memory leak - initially reported in apache#290 Whenever closing an InAppBrowser instance, a webview was left in memory with about:blank page. This change fixes the issue by destroying and freeing the inAppWebView object. * Fix beforeLoad not being called in some requests - initially reported in apache#686 The waitForBeforeload flag was preventing beforeLoad from being called on every GET request. * Do not lose callbackContext when opening a SYSTEM url This fixes a condition where it was not possible to open a SYSTEM url while an InAppBrowser instance is displayed. The callbackContext of the InAppBrowser instance was lost when the SYSTEM url was opened. This fixes the issue by not setting the callbackContext on SYSTEM urls. * Fix crash when pausing/resuming application after closing InAppBrowser * Fix _loadAfterBeforeload callback not working due to this.rootName not being defined. * Reset beforeload variable if a new instance of InAppBrowser is opened without beforeload setting * chore: update changelog References: https://outsystemsrd.atlassian.net/browse/RMET-2802 * refactor: remove empty lines * refactor: use ternary operator and remove unnecessary ones Why: We can refactor the if-else block that assigns a value to beforeload to use a ternary operator. On the other hand, we can remove the unnecessary ternary operators used to assign a boolean value. They are redundant. References: https://outsystemsrd.atlassian.net/browse/RMET-2802 --------- Co-authored-by: Leonardo Monteiro Fernandes <leonardo.monteiro.fernandes@gmail.com> Co-authored-by: Nelson Lopes Silva <5671236+nflsilva@users.noreply.github.com> --------- Co-authored-by: Leonardo Monteiro Fernandes <leonardo.monteiro.fernandes@gmail.com> Co-authored-by: Nelson Lopes Silva <5671236+nflsilva@users.noreply.github.com>
Bug Report
Problem
the 'beforeload' odd fires only on even links, on even links it doesn’t work
What is expected to happen?
It should fire always
What does actually happen?
It fire only odd (half times)
Information
Repository to reproduce
https://github.com/koekaverna/cordova-inapp-testing
Command or Code
Tested with chome DevTools: chrome://inspect/#devices console output
and android emulator
Environment, Platform, Device
Pixel_2_API_R:5584
Version information
Cordova: 9.0.0 (cordova-lib@9.0.1)
Checklist
The text was updated successfully, but these errors were encountered: