Skip to content
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

Keep status bar color when browser popup #321

Open
zdd opened this issue Oct 17, 2018 · 9 comments
Open

Keep status bar color when browser popup #321

zdd opened this issue Oct 17, 2018 · 9 comments
Labels

Comments

@zdd
Copy link

zdd commented Oct 17, 2018

I set the system status bar color as green on startup, but when inappbrowser popup, the status bar turn black, is there any way to keep it as green?
call code:

onButtonClick(itemInfo) {
    let descUrl = itemInfo.desc_url;
    this.inAppBrowser.create(descUrl, '_self', 'hideurlbar=yes,toolbarcolor=#009999,closebuttoncolor=#FFFFFF,navigationbuttoncolor=#FFFFFF');
  }
@janpio janpio added the support label Oct 30, 2018
@bruno-delfim
Copy link

I have the same problem.
When calling inappbrowser with _blank the statusbar becomes black

@NishantDesai1306
Copy link

I'm also stuck at this point, my app does not have status bar at the splash screen (which is how I've set it) but as soon as I open any webpage in inAppBrowser the status bar returns.

@cape-dev
Copy link

cape-dev commented Jul 23, 2019

For now a quiet dirty quickfix is to set the statusbar styles on exit of the InAppBrowser:

const iab = this.browser.create(url, 'blank', this.iabOptions);
const exitSubscription = iab.on('exit').subscribe(() => {
      let counter = 1;
      const intervalId = setInterval(() => {
        if (counter < 20) {
          this.statusBar.styleLightContent();
          counter++;
        } else {
          clearInterval(intervalId);
          exitSubscription.unsubscribe();
        }
      }, 100);
    });

I am setting the style multiple times because somehow the app does not recognize any stylings to the statusBar via the plugin's methods for some time (this time differs on different devices). Maybe the Ionic context is not ready yet.

@Damini17
Copy link

Damini17 commented Sep 5, 2019

Any solution to the above issue @zdd?

Thanks in advance!

@Macfa

This comment has been minimized.

1 similar comment
@DigitalTAC

This comment has been minimized.

@breautek
Copy link
Contributor

If this was an issue on ios, #656 was merged in that made a lot of changes with the statusbar while the inappbrowser was displayed. This PR should be included in the latest version of the plugin.

It would be appreciated if one can test against the latest version to see if this issue still is valid.

@eradin
Copy link

eradin commented Aug 4, 2020

I built with ios 6.1 and InAppBrowser Plugin 4.0. The status bar background is correct (matches my app) but the foreground (text) is black where my app text is white. Since the status bar is created by the plugin, perhaps a statusbar color option would be helpful?

My call is:

options = 'clearcache=yes,clearsessioncache=yes,location=no,toolbar=no,hardwareback=no,zoom=no'
ref = cordova.InAppBrowser.open(url, '_blank', options)

@adammeyer
Copy link

The iOS status bar isn't being covered by the IAB, but yet the IAB is changing the status bar text color. Is there anyway to turn this off?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests