-
Notifications
You must be signed in to change notification settings - Fork 482
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
[Android] overlaysWebView(true) doesn't work as expected when called in deviceready event #158
Comments
This problem still not solved ! |
Any help to investigate this issue or PRs would be greatly appreciated. |
In my testing, if you apply the PR #171 and set the overlay via I still haven't determined the cause of the statusbar not working properly when using the JS api on the |
This comment has been minimized.
This comment has been minimized.
@breautek, related, to your comment #172 (comment); I'm not sure if it's the same issue. The page is rendered properly, but then immediately, the WebView height is increased by the size of the statusbar and we see the map being resized to fit the new viewport. And this doesn't happen at the application startup, we change the |
Follow this approach to overcome the bug in the StatusBar plugin:
Reverse the logic to prevent the status bar fro overlaying the web view. |
Were you ever able to fix this issue? I am currently seeing this on my app. |
Bug Report
Problem
Statusbar doesn't go into overlaymode when using
overlaysWebView(true)
when called inside thedeviceready
callback.What is expected to happen?
The statusbar should go into overlay mode.
What does actually happen?
The statusbar stays in solid.
Information
I've provided a reproduction app available at https://github.com/breautek/statusbar-overlay-issue
I simply call
StatusBar.overlaysWebView(true)
, however the statusbar remains a solid black colour.If I open up the dev tools, and call
StatusBar.overlaysWebView(true)
again via the javascript console, it still doesn't work.In the console, if I do:
Then the statusbar finally goes into the overlay state.
Additionally, if I comment out the
StatusBar.overlaysWebView(true);
line indeviceready
and launch the app. Then callStatusBar.overlaysWebView(true);
in the console, the statusbar does go into overlay mode the first time. SurroundingStatusBar.overlaysWebView(true);
also works the first time indeviceready
IF I surround the statement in asetTimeout
of 1 second.Occassionally the code in the reproduction app works as expected as is the first time. This suggests there is a race condition at play here.
Original discovery of this bug was found at #155 (comment)
Command or Code
Environment, Platform, Device
Observed on Android 6 & Android 9, cordova-android 8.1.0
Cordova 9
Version information
Checklist
The text was updated successfully, but these errors were encountered: