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
Input field keeps losing focus. #6783
Comments
The problem is that you're creating an entirely new Form each time you build, because you're giving it a new different anonymous key each time. |
I wonder if we should add some docs to https://flutter.io/text-input/ ? |
This particular issue is not Form- or Input-specific. But yes, we should help people who end up in this situation, certainly. |
@Hixie I get it, the key should be a top-level constant right ? |
@sethladd https://flutter.io/text-input/ has no documentation on Forms, InputFormFields and FormFields. #6779 |
re the key, it depends what you're doing. In general a Form doesn't require a key. re the docs, yeah those are new as of the last week. We're iterating on them right now, we'll update the docs when we're more stable in a few weeks I expect. |
@Hixie Okay thanks for your help ! |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
As you can see in the GIF below, the input field keeps losing focus each time the user tries to interact with.
The portion of code responsible for the Input field:
The text was updated successfully, but these errors were encountered: