Skip to content
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

Tab/Next support #54

Closed
awhitford opened this issue Apr 28, 2019 · 5 comments
Closed

Tab/Next support #54

awhitford opened this issue Apr 28, 2019 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@awhitford
Copy link
Collaborator

(This issue may be limited to running the Simulator, but it does impact testing and development.)

It would be great to be able to hit Tab to advance to the next Field.

Flutter does not (yet) do this out of the box: flutter/flutter#11344
But maybe your awesome framework could? 😄

@danvick
Copy link
Collaborator

danvick commented Apr 30, 2019

Hi @awhitford,
It will be considered, especially if you put it that way ;-)

One thing to note however is that since the form includes other non-TextField input fields, it would present a problem if the next field in the form is not text-based (like a Switch for instance) and thus can request focus.

I'm not entirely sure if other kind of Widgets in Flutter can request focus and how it can be done. Let's engage on this especially if you have some pointers. This sounds like a cool addition for this package.

Thanks for your contribution.

@awhitford
Copy link
Collaborator Author

Note that flutter/flutter#11344 is now done, so it'd be great to revisit this. I'm interested in having a more convenient "Next" to advance to the next text field (rather than click Done, then focus on the next field). When testing via Simulator (and not using a virtual keyboard), I also am interested in being able to advance to the next field by clicking the Tab key.

Also note that ultimately Flutter needs to be consistent with Web semantics now that Flutter Web is a thing, and form order is important for that. (Not that I tested it yet.)

THANKS!

@awhitford
Copy link
Collaborator Author

awhitford commented Sep 25, 2019

I see lots of open issues in Flutter related to this request. It seems that many folks are complaining about it. Issue flutter/flutter#11344 (comment) suggests a workaround using FocusScope. There is an example in the EditableText.onSubmitted documentation.

@awhitford
Copy link
Collaborator Author

I just discovered that I can use textInputAction: TextInputAction.next to get the next appearing on the keyboard. Alas, clicking it does nothing -- it does not advance to the next field automatically. Is there a handler for this?

@wayne-werner
Copy link

            onFieldSubmitted: (value) =>
                FocusScope.of(context).requestFocus(priceFocusNode),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants