fix: fill the iOS standalone PWA viewport - #547
Merged
Conversation
This was referenced Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
visualViewport.heightoverride while the software keyboard is open.Problem
When Pi Web is launched from the iOS Home Screen, WebKit can report
100dvhandwindow.innerHeightwithout the status-bar strip even though the page layout still starts at the top of the screen. The app shell currently falls back to100dvh, so its resting height is too short. The composer and bottom controls end early, leaving a visible unused area above the Home indicator.This only reproduces in installed standalone mode; the regular browser viewport behavior should remain unchanged.
Reproduction
Expected: the shell fills the screen while its content continues to respect the safe-area insets.
Fix
Set
--app-viewport-height: 100vhonly under@media (display-mode: standalone). Standalone mode has no browser toolbar, sovhis stable there and includes the strip omitted bydvh/innerHeighton affected iOS versions.The existing keyboard hook still writes
visualViewport.heightas an inline custom-property value while an editor is focused. That inline value overrides this stylesheet default, so the composer remains above the keyboard. Non-standalone browser mode continues to use the existing100dvhfallback.This is the upstream-based transplant of epheien/pi-web@d0168ab.
Verification
node --test components/MobilePwaLayout.test.mjs hooks/useViewportHeight.test.mjs(9 tests passed)node_modules/.bin/tsc --noEmitnpm run lintScreenshots
Before
After