PDLMobileApps commented on issue #686: URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/686#issuecomment-676509869
> I am able to repro this: the `beforeload` event is only being fired intermittently because the native `shouldOverrideUrlLoading` method is being called intermittently. > > I've found a solution which seems to work in [this SO answer](https://stackoverflow.com/a/55610567/777265) - adding this seems to resolve the issue and `beforeload` is fired on every request as would be expected on Android: > > ``` > inAppWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); > ``` > > While [MIXED_CONTENT_ALWAYS_ALLOW](https://developer.android.com/reference/android/webkit/WebSettings#MIXED_CONTENT_ALWAYS_ALLOW) is not recommended, setting [MIXED_CONTENT_COMPATIBILITY_MODE](https://developer.android.com/reference/android/webkit/WebSettings#MIXED_CONTENT_COMPATIBILITY_MODE) or [MIXED_CONTENT_NEVER_ALLOW](https://developer.android.com/reference/android/webkit/WebSettings#MIXED_CONTENT_NEVER_ALLOW) seems to cause the intermittent failure to invoke `shouldOverrideUrlLoading`, so I would propose setting `MIXED_CONTENT_ALWAYS_ALLOW` to resolve this issue. 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! ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
