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

Change the viewport-fit so env(safe-area-inset-bottom, 0) is evaluated by Safari properly. #11

Merged
merged 1 commit into from
Apr 6, 2024

Conversation

jaggy
Copy link
Contributor

@jaggy jaggy commented Apr 5, 2024

This fix is specific to the bottom safe area for IOS (and maybe if some android devices have these).

I deployed 2 different sites so they can be tested individually, only two extensions installed: Flarum PWA & Mobile Tab.

https://before-pwa-fix.pigeons.dev/

https://after-pwa-fix.pigeons.dev/

Before:

CleanShot 2024-04-05 at 17 01 16@2x

After:

CleanShot 2024-04-05 at 17 01 22@2x


It seems like safe-area-inset-bottom isn't evaluated when viewport-fit is not set to cover.

As a side effect, this is the change that happens when viewing the device on landscape.

Before:
Before Landscape

After:
After Landscape


Tested also with an android device which didn't have any changes on my end.

Android Landscape

Android Portrait

@rafaucau rafaucau self-requested a review April 5, 2024 10:05
@rafaucau

This comment was marked as outdated.

@rafaucau

This comment was marked as outdated.

@rafaucau
Copy link
Member

rafaucau commented Apr 6, 2024

I reproduced this bug on iOS 17.4. In the Safari browser it worked fine, but after adding a shortcut to the home screen, Mobile Tab behaves differently. Thanks!

@rafaucau rafaucau merged commit d1875a9 into android-com-pl:master Apr 6, 2024
2 checks passed
@rafaucau rafaucau removed their request for review April 6, 2024 15:39
@jaggy jaggy deleted the pwa-fix branch April 6, 2024 17:25
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

Successfully merging this pull request may close these issues.

2 participants