Skip to content

fix(mobile): swallow blank-space terminal long presses - #471

Merged
Ark0N merged 1 commit into
Ark0N:masterfrom
DodgyBadger:fix/mobile-blank-long-press
Sep 23, 2026
Merged

Ark0N merged 1 commit into
Ark0N:masterfrom
DodgyBadger:fix/mobile-blank-long-press

Conversation

@DodgyBadger

Copy link
Copy Markdown
Contributor

Summary

  • Arm the terminal focus and compatibility-mouse guards before checking whether a long press landed on selectable text.
  • Keep blank-space long presses marked for consumption so the existing touchend path suppresses Android Chrome's native behavior.
  • Continue showing the selection, vibration, and Copy/Line toolbar only when a word was selected.
  • Add CI-visible regression coverage for the blank-space path.

Fixes #360

Testing

  • npm test -- test/terminal-touch-tap.test.ts (58 passed)
  • npm test (7,828 passed, 12 skipped)
  • npm run check:frontend-syntax
  • npm run check:public-assets
  • Manual Android Chrome test confirmed that long-pressing blank terminal space no longer blanks the viewport.

@Ark0N
Ark0N merged commit 993e5e0 into Ark0N:master Sep 23, 2026
2 checks passed
@Ark0N

Ark0N commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Merged, thanks @DodgyBadger! This ships in 1.32.1.

It is exactly the fix we sketched in #360: arm the focus and compat-mouse guards before asking whether the press landed on text, so a hold on blank space gets swallowed the same way a hold on a word already was. Small, and the regression test really does fail on master, which is what made this an easy merge with no changes on my side.

Two behaviour edges come with treating every 350 ms hold as a long press, both intended: a slow press on blank space no longer extends an existing selection (a quick tap still does), and a slow press on the blank tail of the prompt row no longer opens the keyboard. If either feels wrong on your phone, tell me and we tune it.

@github-actions github-actions Bot mentioned this pull request Sep 23, 2026
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.

fix(mobile): long-press selection blanks the terminal on Android Chrome

2 participants