Skip to content

mobile: drawer fills behind the iOS toolbar + instant close (no delay)#284

Merged
estradino merged 1 commit into
mainfrom
claude/ios-menu-full-height-2
Jun 22, 2026
Merged

mobile: drawer fills behind the iOS toolbar + instant close (no delay)#284
estradino merged 1 commit into
mainfrom
claude/ios-menu-full-height-2

Conversation

@estradino

Copy link
Copy Markdown
Contributor

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, with 100vh fallback) so they fill the full screen behind the translucent toolbar — no dark band. This is safe now because both are display:none when 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 before display: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).

.or-drawer { display: none; height: calc(100lvh - var(--theme-navbar-height)); /* no transition here */ }
body.mobile-sidebar-toggle #mobile-left-sidebar.or-drawer { display: block; transform: translateX(0); transition: transform .25s ease, display .25s allow-discrete; }
#mobile-overlay { display: none; height: 100lvh; bottom: auto; }

Verification (WebKit @ iPhone viewport)

  • Slide-in still animates (mid-open transform captured)
  • After close, drawer + overlay compute display: none within ~40ms (was ~250ms) → no delay, and iOS's viewport releases immediately
  • Heights resolve to the full viewport (on iOS, lvh extends behind the toolbar)

Same standing caveat: no iOS Simulator on the build machine, so the behind-the-toolbar fill and the toolbar timing need your on-device check. But this directly addresses both things the recording showed.

🤖 Generated with Claude Code

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>
@estradino estradino merged commit ccbeadc into main Jun 22, 2026
4 checks passed
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.

1 participant