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

Device elements overlap ionic header #234

Closed
boengli opened this issue Jul 27, 2022 · 6 comments
Closed

Device elements overlap ionic header #234

boengli opened this issue Jul 27, 2022 · 6 comments

Comments

@boengli
Copy link

boengli commented Jul 27, 2022

Since updating to cordova-android 11.0.0 I have the problem, that device elements overlap ion-header.

Before the update, it extended the header and made space.

enter image description here

Config.xml:

<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="Fullscreen" value="true" />

So far, I found out, that it works, after window.location.replace('/home'); but that's not really a solution.
Looks like '--ion-safe-area-top' is only set after a reload.
StatusBarOverlaysWebView: true/false makes no difference.

@Winamp9
Copy link

Winamp9 commented Sep 16, 2022

Did you find a solution?

@jcesarmobile
Copy link
Member

<preference name="Fullscreen" value="true" /> makes the app full screen, so that's conflicting with StatusBarOverlaysWebView false, which is the opposite of making the app full screen.

@boengli
Copy link
Author

boengli commented Oct 12, 2022

StatusBarOverlaysWebView: true or false, makes no difference. It's always the same/mentioned result. The safe-area isn't written correctly after app start, see #1465

@jcesarmobile
Copy link
Member

What I mean is, if you remove <preference name="Fullscreen" value="true" /> but keep <preference name="StatusBarOverlaysWebView" value="false" />, then you'll get a solid status bar and you shouldn't have to worry about the safe-area.
The safe-area is handled by the WebView, not by cordova-android nor cordova-plugin-statusbar, so the fact that it works if you reload looks like a timing issue on the WebView (meaning, it looks like an Android bug)

@nijakobius
Copy link

I have found a solution and posted it here: apache/cordova-android#1465

@NiklasMerz
Copy link
Member

The safe-area is not implemented/released in Androids WebView. See this Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1094366

This mean unfortunately you need to use workarounds like @nijakobius ' mentioned for now until Android gets updated.

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

No branches or pull requests

5 participants