dpa99c commented on issue #686: URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/686#issuecomment-654795318
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 invoked `shouldOverrideUrlLoading`, so I would propose setting `MIXED_CONTENT_ALWAYS_ALLOW` to resolve this issue. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org