Open ianspryn opened 4 years ago
Is there a solution to this problem?
is there any workaround on this problem?
This does not appear to be fixed yet. However if i switch to ReorderableWrap, it works, so something is wrong with the ReorderableColumn. Unfortunately Wrap don't work as nicely with my column layout, so hope there is a fix for the Column soon :-)
Hitting the same error with keyboard being dismissed when tapping a textField inside ReorderableColumn
There are quite a few ways to cause the issue
requestFocus()
on aTextField
right after it is built that exists in a ReorderableColumn, then tap the submit in the keyboard to dismiss the keyboard and unfocus the text field. After doing this, tapping the text field will cause the keyboard to flash and immediately disappear, and the text field does not gain focus. However, tapping it at 2nd time will finally bring the keyboard up and give focus to theTextField
.TextFields
in one row, and set the first one withtextInputAction: TextInputAction.next
andonSubmitted: (_) => FocusScope.of(context).nextFocus()
. Tapping the next button in the keyboard jumps the focus to the nextTextField
. Now, tap the submit button in the keyboard. At this point, the keyboard is dismissed and theTextField
is no longer in focus. However, tapping eitherTextField
in that row will never bring up the keyboard permanently and restore focus to theTextField
. It can only be brought back by tapping aTextField
in a separate row or aTextField
outside of theReorderableColumn
, and then tapping the originalTextField
in interest.GestureDetector
as follows:Using this
GestureDetector
allows a user to tap anywhere on the screen that is not aTextField
or something similar and dismiss the keyboard and remove focus from the field. Now, like the 1st example,requestFocus()
on aTextField
right after it is built. After that, tap out of theTextField
. No matter what text field you tap in theReordableColumn
, you cannot regain focus on aTextField
unless you tap the field that you initially performedrequestFocus()
on or you tap aTextField
that is outside of theReorderableColumn
.Wrapping the content in a
Column
instead of aReorderableColumn
fixes all of the issues described above.Attached is some sample code that demonstrates all of the described problems.