apache / cordova-plugin-inappbrowser

Apache Cordova InAppBrowser Plugin
https://cordova.apache.org/
Apache License 2.0
1.11k stars 2.14k forks source link

When In app browser is shown, base Cordova Webview does not honour page visibility #302

Open lougreenwood opened 5 years ago

lougreenwood commented 5 years ago

The Page Visibility API allows an app to know whether a page is currently being displayed to a user or not.

It seems that the typical in app browser use case does not honour this.

For example, if a Cordova app shows an in app browser to allow a user to login, the base Cordova web view should report that it is not visible.

The current (IMO incorrect behaviour) is for the page visibility API to return visible for the Cordova web view when the IAB is shown, rendering the page visibility API as useless in Cordova 😞

janpio commented 5 years ago

What platform? Android, iOS, both, others? Does this affect only InAppBrowser or also other plugins that "overlay" the Cordova webview? Do you have a simple test case based on cordova create that could be used to verify and test this?