Repository navigation
Stop iOS double-tap zoom on the board - #78
Merged
Merged
Conversation
iOS Safari ignores user-scalable=no, so a quick second tap on a cell (empty -> dot -> queen) zoomed the page mid-game. Set touch-action: manipulation on <html> and cancel touchend on the board (non-passive); input runs on pointer events, so taps and swipes are unaffected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K79iKR3yQNwPX7Q3fc7Vzd
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Problem
On iPhone (Safari and the LinkedIn in-app browser, iOS 27), a quick second tap on a cell — the normal empty → dot → queen move — zoomed the page mid-game. iOS has ignored
user-scalable=noin the viewport meta since iOS 10, and the board'stouch-action: nonealone did not stop WebKit's double-tap recognizer.Fix
css/styles.css:touch-action: manipulationonhtml, body. Effective touch-action is the intersection over ancestors, so this disables double-tap zoom page-wide (buttons, text) while keeping pinch-zoom for accessibility.js/main.js: a non-passivetouchendlistener on the board that cancels the event — what WebKit's double-tap recognizer respects. Input runs entirely on pointer events (already fired by then); only the synthetic click is lost, and nothing on the board listens for one.Tests
tests/browser/double-tap-zoom.mjs(touch-emulated Chromium):<html>touch-action ismanipulation, both touchends of a quick double tap are cancelled, the taps still land (cell ends as queen), page not zoomed, toolbar buttons still click. Fails with the JS change reverted. Chromium never zooms here, so it asserts the guards rather than the zoom itself.touch-accuracy(swipes/axis lock),reset-timer,board-size-hint, alltests/logic/.CLAUDE.md lists the new test.
🤖 Generated with Claude Code
https://claude.ai/code/session_01K79iKR3yQNwPX7Q3fc7Vzd
Generated by Claude Code