Problem
On Android 17 using the built-in Chrome browser, long-pressing terminal text does not produce a selection. The terminal instead goes blank and no Copy/Line toolbar appears.
This is a regression in the touch-selection feature added through #322.
Investigation
The custom selection starts after 350 ms and attempts to suppress Android Chrome native long-press behavior. The focused logic suites pass (81 tests), but they mock the browser and renderer rather than exercising a real Android-style touch hold.
Suspected race:
- Codeman begins the xterm selection.
- Chrome native long-press handling focuses the hidden xterm textarea.
- The focus guard immediately blurs it.
- The partial keyboard viewport animation triggers terminal resize handling.
- The resize path can clear the terminal before a TUI redraw, losing the selection and leaving a blank viewport.
Related concerns:
- Scrollback touchstart deliberately does not call preventDefault, leaving native long-press behavior active.
- The 8 px movement threshold may cancel normal finger drift too aggressively.
- Xterm 6 themes use
selectionBackground, but Codeman currently supplies the obsolete selection property, which can make the highlight invisible or inconsistent.
Expected behavior
A long press selects terminal text and reveals the Copy/Line toolbar without opening the keyboard, resizing the terminal, clearing content, or changing the scroll position.
Acceptance criteria
- Works at both the live bottom and in scrolled-up history on Android Chrome.
- Terminal dimensions, buffer content, and viewport anchor remain unchanged.
- Selection and toolbar survive touchend.
- Selection highlight uses the xterm 6
selectionBackground property. - Add a real Chromium mobile touch-hold regression test, including the hidden-textarea focus path.
- Existing tap, scroll, link, and terminal-keyboard gestures remain intact.
Problem
On Android 17 using the built-in Chrome browser, long-pressing terminal text does not produce a selection. The terminal instead goes blank and no Copy/Line toolbar appears.
This is a regression in the touch-selection feature added through #322.
Investigation
The custom selection starts after 350 ms and attempts to suppress Android Chrome native long-press behavior. The focused logic suites pass (81 tests), but they mock the browser and renderer rather than exercising a real Android-style touch hold.
Suspected race:
Related concerns:
selectionBackground, but Codeman currently supplies the obsoleteselectionproperty, which can make the highlight invisible or inconsistent.Expected behavior
A long press selects terminal text and reveals the Copy/Line toolbar without opening the keyboard, resizing the terminal, clearing content, or changing the scroll position.
Acceptance criteria
selectionBackgroundproperty.