Commit 8422299
mobile: stop locking root scroll on drawer open (fixes stuck iOS toolbar gap) (#281)
Follow-up to #280. The page now scrolls correctly on navigation, but opening the drawer
reintroduced the bottom black gap on iOS Safari, and it persisted after closing — the
toolbar stopped retracting on scroll.
Cause: #280's drawer-open scroll lock set `overflow: hidden` on html/body. On phones the
document is the scroller, and toggling overflow on the ROOT scroller makes iOS Safari snap
its toolbar back to the expanded state and leaves the viewport stuck. So the gap reappears
when the drawer opens and sticks after it closes.
Fix: remove the root overflow lock. It isn't needed for background containment — the
drawer's `overscroll-behavior: contain` plus the overlay's `touch-action: none` keep touch
scrolling out of the page without ever touching the root scroller, so the document stays
scrollable and Safari's toolbar keeps retracting normally through open/close.
Verified in WebKit: html/body overflow stays `visible` across the open->close cycle (it was
flipping to hidden on open), the document remains scrollable afterward, and tap-on-overlay
still closes the drawer.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 4e5663b commit 8422299
1 file changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
0 commit comments