Skip to content

[Bug]: SystemBars style gets reset when orientation changes #8294

@pomm0

Description

@pomm0

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 8.0.0
  @capacitor/core: 8.0.0
  @capacitor/android: 8.0.0
  @capacitor/ios: 8.0.0

Installed Dependencies:

  @capacitor/cli: not installed
  @capacitor/core: 8.0.0
  @capacitor/android: 8.0.0
  @capacitor/ios: 8.0.0

[error] Xcode is not installed
[success] Android looking great! 👌

Other API Details

npm: 10.9.3
node: v22.18.0

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

When setting the SystemBars style to LIGHT (probably anything else then DEFAULT)

// capacitor.config.json

"plugins": {
    "SystemBars": {
      "style": "DARK"
    }
  },

it boots with the proper style, but when changing the orientation to landscape for instace, the style is DEFAULT/LIGHT again.

2026-01-06_16.38.54.mp4

Expected Behavior

The style remains DARK as defined

Project Reproduction

https://github.com/pomm0/capacitor-systembars-style-reset-issue

Additional Information

Current workaround I'm using:

const styleStatusBar = async () => {
  await this.SystemBars.setStyle({
    style: SystemBarsStyle.Dark,
    bar: SystemBarType.StatusBar,
  });
};

void styleStatusBar();

await this.ScreenOrientation.addListener('screenOrientationChange', () => void styleStatusBar());

This is also an issue when setting the systemBars style via JS only, without the capacitor.config.json.

Not sure if iOS has this issue as well, cannot test it at the moment.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions