[General]: FormField gains focus
back after a modal/dialog is closed
#1429
Labels
bug
Something isn't working
focus
back after a modal/dialog is closed
#1429
Is there an existing issue for this?
Package/Plugin version
9.3.0 <Tried on latest 9.4.1 as well>
Platforms
Flutter doctor
Flutter doctor
Minimal code example
Code sample
ST Input Field Inside
Current Behavior
When any text field is tap to enter some value, and any dialog or modal is opened with the field still in focus. When the dialog exit the focus goes back to the text field. Which is weird, it shouldn't happen.
I've already tried the
FocusScope.of(context).unfocus()
call before opening the keyboard but doesn't work.Expected Behavior
When a text field is in focus and any dialog or modal is opened, the field should lose its focus i.e.
unfocus
and shouldn't gain focus back after the modal or dialog is closed.Steps To Reproduce
FYI:
This won't happen if you unfocus the field yourself i.e. tap on the screen or the "done" button on keyboard.
Aditional information
It only happens if the text field has gained its focus one time, if you don't tap the field, it won't gain its focus on closing of modal or dialog.
The text was updated successfully, but these errors were encountered: