You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mobile: Support mobile text selection and scrollbar dragging (longbridge#3058)
## Summary
Mobile TextViews did not respond to long presses, and dragging a
scrollbar thumb was interpreted as content panning, moving in the
opposite direction.
- Select a word on long press, capture the gesture, extend the selection
while dragging, and release it on end/cancel. Register rendered text
geometry so rich-text word hit testing works and the initial word
selection survives redraw.
- Claim touch drags that start on scrollbar thumbs and map finger
movement to the scroll offset, preserving ordinary content panning.
- Use the native iOS font for the FPS HUD so mobile hosts no longer need
a vendored font workaround.
Uses existing GPUI APIs without changing GPUI core or dependency
versions. Native platform touch delivery is supplied by the companion
[gpui-mobile PR #6](longbridge/gpui-mobile#6).
## Test Plan
- Passed: all 893 `gpui-base` library tests with the identical five-file
selection/scrollbar patch in an isolated worktree using GPUI 0.3.4.
- Added regressions for long-press word selection followed by drag
expansion, and downward scrollbar dragging followed by cancellation.
- Passed: iOS and Android ai-chat host compile checks using these local
sources, including the iOS FPS HUD.
- Passed: formatting and `git diff --check`.
- Simulator/device interaction checks are pending; this PR does not
claim native gesture or IME end-to-end validation.
Co-authored-by: Codex <[email protected]>
0 commit comments