Skip to content

fix(modal): stay inside the visible area when the browser pans it for the keyboard - #726

Closed
blvdmitry wants to merge 1 commit into
mainfrom
claude/happy-lovelace-517cdv
Closed

blvdmitry wants to merge 1 commit into
mainfrom
claude/happy-lovelace-517cdv

Conversation

@blvdmitry

@blvdmitry blvdmitry commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Closed in favour of #727.

This PR made edge modals follow the pan iOS applies for the on-screen keyboard, by tracking the visual viewport's offsetTop and moving it from the modal's bottom inset to its top inset. #727 prevents the pan in the scroll lock instead, so the modal layout doesn't need to know about it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TKGZMi1nf8CnLci2kLKjSy

… the keyboard

iOS pans the visual viewport down the layout to reveal a focused field once the on-screen keyboard
opens, which moves fixed modals up with the page. Edge modals ended above the keyboard by the
panned distance with their top outside of the screen. The keyboard store now tracks the pan,
useVirtualKeyboard returns it as offset, and Modal moves it from its bottom inset to its top one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TKGZMi1nf8CnLci2kLKjSy
@github-actions

Copy link
Copy Markdown

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Library / JS 54.09 KB (+0.07% 🔺) 1.1 s (+0.07% 🔺) 0 ms (+100% 🔺) 1.1 s
Library / CSS 24.93 KB (+0.2% 🔺) 499 ms (+0.2% 🔺) 0 ms (+100% 🔺) 499 ms
Theming / JS 7.8 KB (0%) 156 ms (0%) 199 ms (+508.94% 🔺) 355 ms
Theming with a default theme definition / JS 8.68 KB (0%) 174 ms (0%) 78 ms (-2% 🔽) 252 ms

@blvdmitry blvdmitry closed this Nov 22, 2026
@blvdmitry blvdmitry changed the title fix(modal): stay inside the visible area when the browser pans it for the keyboard fix(scroll lock): keep Safari from panning the locked page for the on-screen keyboard Nov 22, 2026
@blvdmitry blvdmitry changed the title fix(scroll lock): keep Safari from panning the locked page for the on-screen keyboard fix(modal): stay inside the visible area when the browser pans it for the keyboard Nov 22, 2026
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.

2 participants