Skip to content

Status Bar  #277

Open
Open
@lukas-729

Description

@lukas-729

Bug Report

Problem

I am working on an iPad-only application with fixed orientation (landscape) except for when a PDF is viewed (can be viewed in Landscape and Portrait).

Status Bar issue is present when these steps are performed:

  1. PDF is opened in the app (using a system PDF viewer)
  2. The device rotated to Portrait
  3. PDF is closed and the app automatically rotates back to Landscape

What is expected to happen?

Refresh the Status Bar color and text in full status bar width.

What does actually happen?

The plugin uses the Portrait-orientation width; therefore, a black stripe is on the right side.
See the status bar:
issueStatusBar

Information

Status Bar issue is present when these steps are performed:

  1. PDF is opened in the app (using a system PDF viewer)
  2. The device rotated to Portrait
  3. PDF is closed and the app automatically rotates back to Landscape

NOTE: PDF file is created using the PDF Generator plugin v2.0.8

Command or Code

When I was debugging the usage of the plugin I found out that the method resizeStatusBarBackgroundView in:

-(void)statusBarDidChangeFrame:(NSNotification*)notification
{
    //add a small delay ( 0.1 seconds ) or statusbar size will be wrong
    __weak CDVStatusBar* weakSelf = self;
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
        [weakSelf resizeStatusBarBackgroundView];
        [weakSelf resizeWebView];
    });
}

uses still the Portrait orientation display width, not the landscape one. Removing the line helped to resolve the issue, but I cannot use the modified version of the plugin.

Environment, Platform, Device

iPadOS 16 and above, more precisely:

  • iPadOS 16.6.1 - Model: iPad (9th generation)
  • iPadOS 17.3.0 - Model: iPad (10th generation)
  • iPadOS 18.0.0 - Model: iPad Air (13-inch) (M2)

Version information

Cordova iOS v6.2.0
Xcode v 15.4
Codova Status Bar plugin v4.0.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions