Skip to content

Phone: a long press or drag opens none of the browser's menus - #121

Merged
ChefControl merged 3 commits into
mainfrom
claude/no-long-press-menu
Oct 22, 2026
Merged

ChefControl merged 3 commits into
mainfrom
claude/no-long-press-menu

Conversation

@ChefControl

Copy link
Copy Markdown
Owner

On an iPhone, holding or dragging for a while could bring up the browser's own bar ("Search with Firefox | Find in Page") over the game. Selection was off only by way of the body, and iOS still runs its long-press, loupe and menu gestures on a touch that starts on the canvas.

  • index.html: no selecting, no callout and no tap highlight on every element. Text fields, the Korki letter and links keep theirs.
  • src/noMenus.ts (new, imported by main.ts): no right-click or long-press menu and no selection start outside those. A touch that starts on a play surface (the game, the south door's find, the pot's game, the report drawing) keeps iOS's gestures off, while its buttons still get their taps. A selection that starts anyway is let go at once.
  • src/uiShowcase.ts: the kit showcase's text stays selectable.

Checked in Safari on the iOS Simulator (walking after a long hold, the gear button, a long press on the HUD and settings: no menu) and in a phone-sized browser (HUD text can't be selected, the report box still can). Tested by the owner on an iPhone over wifi.

Test: test/noMenus.test.ts.

🤖 Generated with Claude Code

ChefControl and others added 2 commits October 22, 2026 02:54
On an iPhone a long hold or drag could bring up the browser's own bar
("Search with Firefox | Find in Page") over the game. The body turned
selection off, but only by inheritance, and iOS still runs its
long-press, loupe and menu gestures on a touch that starts on the
canvas.

- index.html: no selecting, no callout and no tap highlight on every
  element; text fields, the Korki letter and links keep theirs
- noMenus.ts: no right-click or long-press menu and no selection start
  outside those; a touch that starts on a play surface (the game, the
  south door's find, the pot's game, the report drawing) keeps iOS's
  gestures off; a selection that starts anyway is let go at once
- uiShowcase.ts: the kit showcase's text stays selectable

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ChefControl
ChefControl enabled auto-merge (squash) October 22, 2026 00:08
@ChefControl
ChefControl merged commit 5aaea09 into main Oct 22, 2026
7 checks passed
@ChefControl
ChefControl deleted the claude/no-long-press-menu branch October 22, 2026 00:25
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