New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Give the option to disable TapAndHorizontalDragGestureRecognizer and LongPressGestureRecognizer for TextFormFields and TextFields #130224
Comments
Hi @Scerbelo12. Thanks for filing this. flutter_slidable is a community package. Can you also provide reorderablelistview example and also try using IgnorePointer class if it helps in your use case? |
Hi, yes I know that is a community package but the problem is related to the TextFields, not the package. Example with reorderablelistview:
IgnorePointer does not solve the problem since it makes impossible to tap on the TextField to edit the content. |
Hi @Renzo-Olivares , can I assume that my proposal is going to be implemented? |
Hi @Scerbelo12 I'm currently exploring methods to fix the issue described. I don't have a current timeline on the fix but there is a workaround I can point you to #127017 (comment) . Essentially it is to wrap the outer scroll view in a |
Thanks, hope you can fix it soon |
This issue is assigned to @Renzo-Olivares but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks! |
I have TextField in PageView. I want to keep TextField vertical scrolling, so i can't wrap TextField in IgnorePointer, but TapAndHorizontalDragGestureRecognizer wins when user trying to scroll horizontally to another page |
This issue was assigned to @Renzo-Olivares but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed. |
The |
Hi @Scerbelo12, as of #147341 you can now have a TextField as a descendant of a draggable widget and still have the draggable win the GestureArena. Are you still interested in this proposal? |
Is there an existing issue for this?
Use case
At the moment, it's impossible to make a TextFormField or a TextField a descendant of a draggable widget (like for example a ReorderableListView or a Slidable (from flutter_slidable)) without making impossible to use the latter.
That's due the fact that TextSelectionGestureDetectorBuilder gesture's (TapAndHorizontalDragGestureRecognizer and LongPressGestureRecognizer) are always the winners of the Gesture Arena.
So, for example, if we have the following Slidable:
it will be impossible to slide the row starting to drag from a point in the TextFormField area.
Proposal
Give the possibility to disable the features relative to text selection in the TextFormFields and TextFields, so that they can be use as descendants of widgets that respond to a drag gesture. Using the enabled property of the TextFormFields and TextFields doesn't solve the problem, cause I would still like to be able to edit the content of the fields.
The text was updated successfully, but these errors were encountered: