super_editor
super_editor copied to clipboard
[SuperEditor][SuperReader] - Connect mobile touch gesture system with caret and handle painter
In SuperEditor
, on mobile, there are three behaviors that come together for content selection.
A document layer positions Leader
s for the caret and handles. The caret is displayed in a document layer and handles are displayed in an overlay. A viewport-wide gesture widget recognizes taps and drags to adjust the selection.
We currently have an issue of separation between the gesture system and the caret and handle positions. The gesture system directly inspects the document layout to infer where the caret and handles are supposed to appear. However, this inference is completely independent from the visual presentation of the caret and handles, i.e., the caret and handles, themselves, don't impact the gesture dragging of the caret and handle.
For this ticket, create an appropriate connection between the things being dragged, and the gesture system that's dragging them. For example, the gesture system be given a reference to the handles and caret so that the gesture system can compare touch coordinates to the bounds of those widgets.