Skip to content

fix(fe): Fix iOS dialog scroll and keyboard#3720

Merged
sea-snake merged 8 commits intomainfrom
sea-snake/various-fixes
Apr 2, 2026
Merged

fix(fe): Fix iOS dialog scroll and keyboard#3720
sea-snake merged 8 commits intomainfrom
sea-snake/various-fixes

Conversation

@sea-snake
Copy link
Copy Markdown
Contributor

@sea-snake sea-snake commented Mar 30, 2026

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

  • Replace custom touchmove/touchstart scroll handlers with touch-pan-y + overscroll-contain CSS for native scroll with inertia.
  • Add touch-none on the dialog element to prevent scrolling outside the content area.
  • Extract keyboard handling into setupVirtualKeyboardApi and setupVisualViewportFallback functions.
  • Rename resolveOutro/onOutroEnd to resolveNavigation/completeNavigation for clarity.
  • Add structured CSS comments explaining dialog (sm+) vs bottom sheet (mobile) layout.
  • Remove unused contentRef binding.
  • Add input-noscroll class to inputs in dialog wizard views (CreatePasskey, EnterIdentityNumber, UpgradePasskey).
  • Change IdentityAvatar wrapper from <span> to <div>, fixes badge position on iOS.
  • Fix null safety in Popover and Tooltip anchor/ref tracking.

@sea-snake sea-snake requested a review from a team as a code owner March 30, 2026 13:11
@sea-snake sea-snake requested a review from aterga March 30, 2026 13:11
@aterga aterga requested a review from Copilot April 1, 2026 08:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Dialog to use native touch scrolling (touch-pan-y + overscroll-contain) and split keyboard handling into VirtualKeyboard vs VisualViewport paths.
  • Add the input-noscroll utility class to wizard inputs to prevent iOS focus scrolling issues.
  • Improve null-safety in Popover/Tooltip ref tracking and adjust IdentityAvatar wrapper 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.

Comment thread src/frontend/src/lib/components/ui/Dialog.svelte
Copy link
Copy Markdown
Collaborator

@aterga aterga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Staging C, this PR fixes the issue on my iphone.

@sea-snake sea-snake enabled auto-merge April 2, 2026 08:25
@sea-snake sea-snake added this pull request to the merge queue Apr 2, 2026
Merged via the queue into main with commit d430cf0 Apr 2, 2026
52 checks passed
@sea-snake sea-snake deleted the sea-snake/various-fixes branch April 2, 2026 08:45
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.

3 participants