Skip to content

S Pen: arm hold-to-erase from the side button's contextmenu when no hover arrives (#209) - #290

Open
Joost-8 wants to merge 1 commit into
mainfrom
claude/issue-209-spen-hover-3b4211
Open

Joost-8 wants to merge 1 commit into
mainfrom
claude/issue-209-spen-hover-3b4211

Conversation

@Joost-8

@Joost-8 Joost-8 commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Discussion #209: a tester's Galaxy Tab S10 Ultra (Android 16, WebView 157) passes no hovering pointer events to the page, with or without the side button. Only real touches, plus one contextmenu when the button is pressed in the air. So erase on hover can't work on that tablet.

What this changes:

  • src/input/air-button.ts (pure): HoverWitness takes a non-touch contextmenu, with no press under way and no hovering move in the last second, for the side button pressed in the air.
  • PointerController.airMenu() then arms the S-Pen side button don't erase #149 selection bridge there, so holding the button and touching down erases. Before, the bridge was armed only by hover moves or a recent pen lift. Android only (the bridge is attached nowhere else); tablets that send hover and the iPad are unchanged.
  • Diagnostics: "Copy shape diagnostics" gains penSeen (hover moves, barrel hover moves, pen downs, contextmenus, air menus, bridge strokes, hover: seen|none); the debug HUD marks air-button: bridge armed.
  • CHANGELOG "Fixed" entry. No visible UI change.

Unproven (no Android device here): that the contextmenu is the press in the air, and that the touch with the button held then reaches the bridge on that tablet. With Side button click = pen menu, the same contextmenu may still open the pen menu (unchanged).

Tests built from the tester's event sequence and the S9 FE one. All CI gates pass locally.

🤖 Generated with Claude Code

…over arrives (#209)

A tester's Tab S10 Ultra (Android 16, WebView 157) passes no hovering
pointer events to the page at all, so erase on hover never got a reading
and the selection bridge for hold-to-erase (#149), armed only by hovering
moves or a pen just lifted, was rarely ready. The button pressed in the
air still arrives as one contextmenu. HoverWitness (air-button.ts) takes
that contextmenu, with no hovering move in the last second and no press
under way, for the button in the air and arms the bridge there. Android
only (the bridge is attached nowhere else); devices that send hover keep
their path unchanged.

Diagnostics: "Copy shape diagnostics" gains penSeen (hover moves, barrel
hover moves, pen downs, contextmenus, air menus, bridge strokes, hover
seen/none); the debug HUD marks "air-button: bridge armed".

Unproven on a device: no Android tablet here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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