Repository navigation
FocusNode does not auto scroll to TextFormField when item already selected #58877
Description
Scenario: this is a big form, the user selects the TextFormField and then manually scrolls down to the save button. if the _formKey.currentState.validate() detects validation issues we can to get the focus back the the TextFormField with issues.
first, we call _myFocusNode.unfocus(); // this works because the keyword is automatically close.
next, we call FocusScope.of(context).requestFocus(_myFocusNode) //this also works because we can start typing right after. but, the FocusScope.of(context).requestFocus is not automatically scrolling back to the TextFormField.
If we try to another TextFormField (Tfield2) other than the last selected, the Tfield2 gets focus and the scroll also makes it visible.
NOTE: if we start typing again, the scroll is executed and the TextFormField becomes visible.

Activity
TahaTesser commentedon Jun 8, 2020
Hi @edwin-alvarez
Can you please provide your
flutter doctor -v, yourflutter run --verboseand a minimal complete reproducible code sample.Thank you
edwin-alvarez commentedon Jun 10, 2020
Steps to reproduce the issue:
NOTE:
if you go directly and press the 'Validate' button without selecting any Texfield, the scroll moves up to the top 100% of the times. but once the user presses the TextField, to gain focus, the issues start again.
Example code
flutter -v doctor
TahaTesser commentedon Jun 10, 2020
flutter doctor -v
edwin-alvarez commentedon Jun 10, 2020
flutterrunverbose.txt
edwin-alvarez commentedon Jun 16, 2020
Any suggestions? This actually make auto focus useless
27 remaining items
waseeqahmad commentedon Nov 16, 2022
maheshj01 commentedon Jan 5, 2023
Reproducible on stable 3.3 and master 3.7
Screen.Recording.2023-01-04.at.9.46.40.PM.mov
code sample
flutter doctor -v (mac)