fix: show paste menu on double tap in QuillEditor #2596
Closed
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.
Fix: Show Paste Menu on Double Tap in QuillEditor (fixed the issue - #2594)
Problem
Currently, the QuillEditor does not show the context menu (paste/copy/cut/select) when a user double taps on a word, which is the default behavior in Flutter’s built-in TextField. This makes it less intuitive for users who expect the paste menu to appear on a double tap, especially when comparing with standard Flutter text input widgets.
Steps to Reproduce
Tap a word in the QuillEditor (field focuses).
Tap the word again (double tap) to try to summon the paste menu.
Actual: The paste menu does not appear.
Expected: The paste menu should appear, just like in Flutter’s TextField.
Solution
Improved gesture handling in the editor to show the context menu (paste menu) on double tap.
Modified the selection change logic to ensure the toolbar appears on selection changes that are not caused by drag or toolbar actions.
Now, tapping a word focuses the field, and double tapping shows the paste menu, matching the behavior of Flutter’s TextField.