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/14 17:29:08 UTC

[GitHub] [cordova-plugin-statusbar] Kinectech opened a new issue #161: [iOS 13] Status Bar Style properties don't work when system dark mode is enabled.

Kinectech opened a new issue #161: [iOS 13] Status Bar Style properties don't work when system dark mode is enabled.
URL: https://github.com/apache/cordova-plugin-statusbar/issues/161
 
 
   # Bug Report
   
   ## Problem
   When system dark mode is enabled in iOS 13, commands such as this.statusBar.styleDefault(), styleBlackOpaque(), etc. doesn't affect the color of the text in the status bar. It begins working again as soon as dark mode is disabled.
   ### What is expected to happen?
   Those commands such as styleDefault() should affect the status bar text color regardless of system dark mode being able.
   
   
   ### What does actually happen?
   The text color doesn't change
   
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   This is the code pertaining to the statusbar in app.component.ts:
   `const prefersDark = window.matchMedia('(prefers-color-scheme: dark)');
         prefersDark.addListener((mediaQuery) => this.themeControl(mediaQuery.matches));
         this.statusBar.overlaysWebView(true);
         this.statusBar.show();
         this.splashScreen.hide();`
   
   This is the code which controls the theme of the app:
   `  constructor(private rendererFactory: RendererFactory2, @Inject(DOCUMENT) private document: Document, private statusBar: StatusBar) { 
       this.renderer = this.rendererFactory.createRenderer(null, null);
     }`
   
    `   enableDark() {
       this.renderer.addClass(this.document.body, 'dark')
       this.statusBar.styleBlackTranslucent();
       Keyboard.setKeyboardStyle('dark')
     }`
   
     `  enableLight() {
       this.renderer.removeClass(this.document.body, 'dark')
       this.statusBar.styleDefault();
       Keyboard.setKeyboardStyle('light')
     };`
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->Observed on iOS 13.1.2 using ionic-v4 compiled to an IPA file on an iPhone XS 
   
   
   
   ### 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