chess: drag pieces to move, mouse and touch - #398
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
muchq | c8b9b48 | Commit Preview URL Branch Preview URL |
Oct 01 2026, 02:03 AM |
|
Blocking
Nits
Fine Pointer Events for mouse and touch; 6px slop; land via Review of #398 |
Contributor
Author
|
Fixed in c8b9b48: the blocking finding and both nits.
Generated by Claude Code |
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.
You can now drag a piece to move it, as well as tapping the piece and then its square. Mouse and touch both go through Pointer Events.
touch-action: none, so the rest of the board still scrolls the page.Tests:
data-grabis set only on movable pieces.Three mutations were run and all three caught: removing the click suppression, landing on the event's target square instead of the square under the pointer, and dropping the slop. Vitest, typecheck and lint are clean.
In Chromium at 390×844, a mouse drag and a touch drag (sent through the DevTools protocol) both played
g6f7, and the touch drag didn't scroll the page.Whether to replace the board with react-chessboard is tracked in #397.
Generated by Claude Code