You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/10/02 01:31:19 UTC

[GitHub] [cordova-plugin-statusbar] breautek opened a new issue #158: [Android] overlaysWebView(true) doesn't work as expected when called in deviceready event

breautek opened a new issue #158: [Android] overlaysWebView(true) doesn't work as expected when called in deviceready event
URL: https://github.com/apache/cordova-plugin-statusbar/issues/158
 
 
   # Bug Report
   
   ## Problem
   Statusbar doesn't go into overlaymode when using `overlaysWebView(true)` when called inside the `deviceready` callback.
   
   ### What is expected to happen?
   The statusbar should go into overlay mode.
   
   
   ### What does actually happen?
   The statusbar stays in solid.
   
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   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:
   
   ```javascript
   StatusBar.overlaysWebView(false);
   StatusBar.overlaysWebView(true);
   ```
   
   Then the statusbar finally goes into the overlay state.
   
   Additionally, if I comment out the `StatusBar.overlaysWebView(true);` line in `deviceready` and launch the app. Then call `StatusBar.overlaysWebView(true);` in the console, the statusbar does go into overlay mode the first time. Surrounding `StatusBar.overlaysWebView(true);` also works the first time in `deviceready` **IF** I surround the statement in a `setTimeout` 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 https://github.com/apache/cordova-plugin-statusbar/issues/155#issuecomment-537291945
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   
   
   ### Environment, Platform, Device
   Observed on Android 6 & Android 9, cordova-android 8.1.0
   Cordova 9
   
   
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org