mobile: drawer fills behind the iOS toolbar + instant close (no delay)#284
Merged
Conversation
Two remaining iOS menu issues from the latest screen recording: - Menu not taking full height: the drawer/overlay were sized to the dynamic viewport (100dvh = the toolbar-shown height), so they ended above the Safari toolbar with a dark band below. Size them to the LARGE viewport instead (100lvh, with a 100vh fallback) so they fill the full screen behind the translucent toolbar — no dark band. This is safe because both are display:none when closed (#283), so they can't pin the layout viewport. - ~0.5s delay on close: the drawer's `display 0.25s allow-discrete` exit kept it in the layout for 0.25s before display:none, so iOS released its pinned viewport (and cleared the gap) only after that delay. Move the transition to the open-state rule so closing is instant; the slide-in still animates (open-state transition + @starting-style). Verified in WebKit: slide-in animates; after close both compute display:none within ~40ms (was ~250ms); drawer/overlay heights resolve to the full viewport. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Follow-up to #283 (which fixed the persistent black box). The recording showed two things left:
1. Menu still not full height (dark band below the drawer)
At full resolution the drawer ends ~125px above the bottom with a black band (containing the Safari toolbar) below it. The drawer/overlay were sized to the dynamic viewport (
100dvh= the toolbar-shown height), so they stop above the toolbar.Fix: size them to the large viewport (
100lvh, with100vhfallback) so they fill the full screen behind the translucent toolbar — no dark band. This is safe now because both aredisplay:nonewhen closed (#283), so a large fixed element can't pin the layout viewport.2. ~0.5s delay when closing ("weird")
The drawer's exit used
transition: display 0.25s allow-discrete, which keeps it in the layout for 0.25s beforedisplay:none. iOS only releases its pinned viewport (and clears the gap) once the element is gone — hence the delay.Fix: move the transition to the open-state rule, so closing reverts to a no-transition default and is instant. The slide-in still animates (open-state transition +
@starting-style).Verification (WebKit @ iPhone viewport)
display: nonewithin ~40ms (was ~250ms) → no delay, and iOS's viewport releases immediatelylvhextends behind the toolbar)🤖 Generated with Claude Code