fix(fe): Fix iOS dialog scroll and keyboard#3720
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves iOS behavior for modal dialogs by switching to native scrolling/overscroll CSS, refactoring keyboard-inset handling, and hardening UI overlay components (Popover/Tooltip) against null refs during lifecycle changes.
Changes:
- Refactor
Dialogto use native touch scrolling (touch-pan-y+overscroll-contain) and split keyboard handling into VirtualKeyboard vs VisualViewport paths. - Add the
input-noscrollutility class to wizard inputs to prevent iOS focus scrolling issues. - Improve null-safety in
Popover/Tooltipref tracking and adjustIdentityAvatarwrapper to fix iOS badge positioning.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/frontend/src/lib/components/wizards/migration/views/UpgradePasskey.svelte | Passes inputClass="input-noscroll" to the shared Input to mitigate iOS focus scroll behavior. |
| src/frontend/src/lib/components/wizards/migration/views/EnterIdentityNumber.svelte | Passes inputClass="input-noscroll" for iOS focus/scroll stability in the dialog flow. |
| src/frontend/src/lib/components/wizards/auth/views/CreatePasskey.svelte | Passes inputClass="input-noscroll" for iOS focus/scroll stability in the dialog flow. |
| src/frontend/src/lib/components/ui/Tooltip.svelte | Makes wrapper/tooltip refs nullable and adds null checks during position tracking. |
| src/frontend/src/lib/components/ui/Popover.svelte | Allows anchor to be nullable and adds null checks for anchor/popover refs during position tracking. |
| src/frontend/src/lib/components/ui/IdentityAvatar.svelte | Switches wrapper from span to div to address iOS badge positioning/layout issues. |
| src/frontend/src/lib/components/ui/Dialog.svelte | Reworks scroll handling to rely on native scrolling and refactors keyboard inset logic into dedicated setup functions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aterga
approved these changes
Apr 1, 2026
Collaborator
aterga
left a comment
There was a problem hiding this comment.
Tested on Staging C, this PR fixes the issue on my iphone.
…internet-identity into sea-snake/various-fixes
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.
Fix dialogs not always being scrollable and rendering out of view on iOS, and improve scroll feel by using native browser scrolling instead of the custom JS touch handler.
Changes
touchmove/touchstartscroll handlers withtouch-pan-y+overscroll-containCSS for native scroll with inertia.touch-noneon the dialog element to prevent scrolling outside the content area.setupVirtualKeyboardApiandsetupVisualViewportFallbackfunctions.resolveOutro/onOutroEndtoresolveNavigation/completeNavigationfor clarity.contentRefbinding.input-noscrollclass to inputs in dialog wizard views (CreatePasskey, EnterIdentityNumber, UpgradePasskey).IdentityAvatarwrapper from<span>to<div>, fixes badge position on iOS.PopoverandTooltipanchor/ref tracking.