Repository navigation
fix(overlay, modal): keep the iOS backdrop out of the page scroll and end edge modals above the keyboard - #723
Merged
Conversation
… end edge modals above the keyboard - Overlay backdrop on iOS bleeds past the viewport with a spread shadow instead of its own height. The taller backdrop made the document scrollable while an overlay was open, so Safari scrolled the page to reveal focused fields and blurred the status bar area over the scrolled page. - Modal with bottom, start, end and full-screen positions ends above the on-screen keyboard when the layout isn't resized for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKGZMi1nf8CnLci2kLKjSy
size-limit report 📦
|
This was referenced Nov 22, 2026
Merged
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
Overlay backdrop on iOS no longer makes the document scrollable. #709 positioned the backdrop absolutely on iOS and let it bleed past the viewport by making it
100dvh + 2 × 50lvhtall. The bottom half of that bleed counts toward the document's scrollable area, so while any overlay is open the page can be scrolled by half a screen, even withoverflow: hiddenon the body. Safari then scrolls the page to reveal focused fields, and iOS 26 blurs the status bar area over a scrolled page. In Untap this showed as a blurred top edge over open modals.The bleed is now a spread
box-shadowon a viewport-sized backdrop. A shadow only paints and doesn't count toward the scrollable area. Checked in Chromium with the iOS styles forced on: an 800px viewport went from a 1200px scroll height (andscrollToreaching 400px) to 800px with no scroll.Modals attached to the screen edges end above the on-screen keyboard.
bottom,start,endandfull-screenmodals used--rs-modal-keyboard-heightonly to drop the bottom safe area, so they still ran on under the keyboard. Their bottom inset now includes the keyboard height (max-heighttoo, forbottom), so their whole content can be scrolled to without the page being panned.centeris unchanged because the overlay scrolls it.Related Issue
The blurred top edge and the unreachable modal top in Untap's page modal on iOS.
Screenshots / Recordings
Not tested on an iOS device yet. Both changes only show in iOS Safari or a home screen app.
Notes for Reviewers
Modal"test: virtual keyboard" browser test now also checks that the modal ends 300px higher while the keyboard is up and comes back down after. It fails without the CSS change.inset-block: auto <keyboard>is used rather thaninitial, because a CSS-wide keyword can't be combined with other values in a shorthand, so the whole declaration was dropped.@supports (-webkit-touch-callout: none), so Chromium tests can't cover them. Please check on a phone that the overlay still reaches under the status bar and the toolbar.Overlay.tsxalignment no longer readsmarginTop, since the backdrop no longer has one.Generated by Claude Code