Skip to content

Fix game picker outside-tap dismissal on iOS - #79

Merged
austin-smith merged 8 commits into
mainfrom
game-picker-ios-dismiss
Jul 16, 2026
Merged

Fix game picker outside-tap dismissal on iOS#79
austin-smith merged 8 commits into
mainfrom
game-picker-ios-dismiss

Conversation

@austin-smith

Copy link
Copy Markdown
Owner

Summary

On iOS, tapping outside the game picker panel often failed to dismiss it, even though the scrim is wired as the picker's cancel button. Two layered causes:

  • The scrim's tappable area stopped at the safe-area insets. ignoresSafeArea() was applied to the Color inside the button's label, which paints edge to edge but leaves the button's hit region inset — taps in the top and bottom strips hit nothing. Moving the modifier onto the button itself makes the hit area truly full-screen.
  • The bottom toolbar is UIKit chrome layered above the SwiftUI overlay. While the picker was open, the More/Hint/Undo pills stayed undimmed and fully tappable (the More menu could open on top of the "modal" picker), and the bar swallowed scrim taps across the whole bottom strip. The bottom-bar items now leave while the picker is open and return when it closes. .toolbar(.hidden, for: .bottomBar) is inert here because no NavigationStack hosts the bar, so the items are conditionally removed instead.

With the bar gone while the picker is up, the panel also gains enough height that all nine games fit without the scrolling fallback on current iPhones.

macOS is unaffected: the toolbar change is iOS-gated and the scrim change is a no-op without safe-area insets.

Testing

  • New testTapOutsideDismissesGamePicker (iOS) covers the bottom-strip tap — the previously dead zone — and asserts the toolbar leaves while the picker is open and returns after dismissal.
  • Existing macOS picker suite (Escape dismissal, accessibility modality, short-window scrolling) passes.
  • Verified by hand in the iPhone 17 Pro simulator: all previously dead regions dismiss, variant sub-pages dismiss the same way, and game selection still switches correctly.

@cursor

cursor Bot commented Jul 16, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@austin-smith
austin-smith merged commit 3b1d64d into main Jul 16, 2026
3 checks passed
@austin-smith
austin-smith deleted the game-picker-ios-dismiss branch July 16, 2026 07:38
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.

1 participant