-
Notifications
You must be signed in to change notification settings - Fork 18
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
var(--safe-area-inset-*) is 0px when plugin is enabled at capacitor.config.json #40
Comments
I am not able to reproduce this. Please provide a minimal reproduction repository for further help |
I have the same issue using it with svelte 5. I build using the svelte static adapter (so mainly SSR), point capacitor to it and --safe-area-inset-top is always max(0px, 0px). I tried with initialize and/or SafeArea.enable. *** FIXED *** |
I believe I am also experiencing this issue on Android 15. The plugin only sets the I did some digging and confirmed that when only using one of the enable options the native Android code is correctly figuring out the insets. This line is correctly getting called to set the vars.
However, after that line is run, and I do not use both enable options, the Intuition suggests that this Line 9 in f48aad2
My solution to this issue was to call:
Note: without And add the following to
|
Seems like a race condition indeed. This might fix it for you: #49 |
I am seeing similar behavior with using just the Upon installation startup and data/cache cleared on android, everything works fine. Once the app is closed and reopened without clearing the data/cache, the bottom inset is evaluated to 0, however the top inset appears to still be working correctly. Having the configuration in |
Describe the bug
if plugin is enabled at capacitor.config.json, var(--safe-area-inset-*) is 0px.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Both top & bottom safe area in css should be the same as status bar & navigation bar's height.
Smartphone (please complete the following information):
Additional context
I need call following code again to make the top & bottom safe area css as normal:
Anyway, I try to call following code, but it does NOT make the top & bottom safe area css as normal:
The text was updated successfully, but these errors were encountered: