Repository navigation
feat(edit): touch gestures to place the cursor, select words and drag handles - #2468
Open
SergioRibera wants to merge 1 commit into
Open
SergioRibera wants to merge 1 commit into
SergioRibera wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the touch model of native text fields to
freya-edit, without any UI:TouchEditEvent(down, move, up, long press, handle down...) processed withUseEditable::process_touch, andTouchSelection, the touch state read withUseEditable::touch.TOUCH_SLOP(then it was a scroll). A double tap selects a word with touch timing and distance, a long press selects the word under the finger and dragging then extends it word by word, and the selection handles move each end.LONG_PRESS_TIMEOUTandTOUCH_SLOPare public so the owner runs the timer and the checks.It's a separate event type rather than new
EditableEventvariants, so code matching onEditableEvent(likefreya-code-editor) keeps compiling.Motivation
Editing text with a finger follows the mouse model today: the cursor moves as soon as the finger goes down and dragging selects. This is the base
Input(and custom editors built onuse_editable) need to behave likeEditText/ Compose /Flutter fields.Checklist