Skip to content

fix(events): suppress selection on click-intent presses (B8 / #61)#87

Merged
re-marked merged 5 commits into
mainfrom
fix/click-suppresses-selection
May 10, 2026
Merged

fix(events): suppress selection on click-intent presses (B8 / #61)#87
re-marked merged 5 commits into
mainfrom
fix/click-suppresses-selection

Conversation

@re-marked

Copy link
Copy Markdown
Owner

Closes #61.

Summary

Press intent classified up front into gesture-confirmed | gesture-tentative | click | select. The click intent (no capture, hit chain has onClick, no force-select modifier) skips startSelection AND multi-click escalation, then fires onClickAt on release via App.pressIntentClick. Force-select modifier (Shift/Alt) demotes click → select so consumers can still highlight text inside a clickable region (Button label, link anchor text). Confirmed/tentative gestures still take precedence — captureGesture always wins.

Pre-fix: a press over any Box with onClick started a selection drag; accidental motion between press and release escalated into a selection, eating the click.

Commits

  1. feat(events): add computePressIntent helper — pure helper + truth-table tests
  2. feat(events): dispatchMouseDown reports clickable — single tree walk, both signals
  3. fix(events): suppress selection on click-intent presses — wire intent + flag lifecycle
  4. test(events): integration tests for click-intent — B8 repro + counter-cases + Shift/Alt + multi-click + gesture priority
  5. docs: note press intent classification

Test plan

  • pnpm typecheck clean
  • pnpm lint clean
  • pnpm build clean
  • pnpm test — 760 passed (was 748; +12 integration + 12 truth-table − 0 regressions)

re-marked and others added 5 commits May 9, 2026 23:35
Co-Authored-By: Mark <psyhik17@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Mark <psyhik17@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Mark <psyhik17@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Mark <psyhik17@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Mark <psyhik17@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@re-marked
re-marked merged commit a463f9f into main May 10, 2026
1 check passed
@re-marked
re-marked deleted the fix/click-suppresses-selection branch May 10, 2026 14:39
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.

B8: Selection state machine swallows clicks

1 participant