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

Would like "next" form behavior in Keyboard #11344

Open
eseidelGoogle opened this Issue Jul 21, 2017 · 41 comments

Comments

@eseidelGoogle
Contributor

eseidelGoogle commented Jul 21, 2017

Normally when filling out a form on iOS or Android the "done" key turns into a "next" key and you don't have to dismiss the keyboard between text fields.

If you try our "Text fields" demo in the flutter_gallery it does not have this expected "next" behavior.

I ran into this initially in Posse's app in the sign-up screen.

@eseidelGoogle

This comment has been minimized.

Contributor

eseidelGoogle commented Jul 21, 2017

#9363 is a related (but different) bug in our text input which is also obvious when attempting to build a sign-up screen.

@eseidelGoogle

This comment has been minimized.

Contributor

eseidelGoogle commented Jul 27, 2017

@cbracken Posse would like to try and work this support into the next release of their app. When you get back, would be interested in learning how hard this will be to do.

@cbracken

This comment has been minimized.

Member

cbracken commented Aug 3, 2017

Related #10372 on iOS.

@cbracken

This comment has been minimized.

Member

cbracken commented Aug 3, 2017

In terms of the work here, the main issue is that we don't currently define a navigation order over widgets.

My guestimate at the work involved:

  1. Determine the minimal default widget traversal order. We could use what we use for accessibility today, which is a traversal of the render tree, IIRC.
  2. Implement support for a user-defined return key type. Currently we only support 'done'.
  3. Implement the focus traversal behaviour when 'next' is pressed.
  4. Enable the iOS nav back/forward input accessory view.
  5. Enable the Android equivalent (I haven't looked into this, but assume one exists).
  6. Additional: Improve the default widget traversal order -- ideally, I assume top-to-bottom, left-to-right (for LTR locales).
  7. Additional: Support a user-defined traversal order.
@Hixie

This comment has been minimized.

Contributor

Hixie commented Aug 4, 2017

cc @abarth who may have ideas for how to do focus traversal

@abarth

This comment has been minimized.

Contributor

abarth commented Aug 4, 2017

I'd build the traversal using FocusNode rather than the render tree. Currently, you only need to register your FocusNode with the FocusScopeNode when you requestFocus [1], you we should add another way of registering the FocusNode for traversal.

If you want to get fancy, you could register with a BuildContext and then traversal could use your global coordinates to guess a default traversal order.

[1] https://docs.flutter.io/flutter/widgets/FocusScopeNode/requestFocus.html

@eseidelGoogle

This comment has been minimized.

Contributor

eseidelGoogle commented Aug 14, 2017

Posse is interested in knowing if this is something reasonable to do in the next two weeks before their next release.

@collinjackson

This comment has been minimized.

Contributor

collinjackson commented Aug 24, 2017

@cbracken is working on this. we are hoping to have something minimal next week, though not including custom focus order.

@xster

This comment has been minimized.

Contributor

xster commented Dec 13, 2017

Minor update: the challenge is that we have no semantics yet that defines ordering of form fields' traversal

@Hixie

This comment has been minimized.

Contributor

Hixie commented Dec 13, 2017

This doesn't fit our current priority list, so I'm moving it to a later milestone.

@Hixie

This comment has been minimized.

Contributor

Hixie commented Jan 3, 2018

For the record, we are not planning on working on this in the near future. Please let us know if that is a problem. Thanks.

@nailgilaziev

This comment has been minimized.

nailgilaziev commented Jan 19, 2018

Input data from keyboard to UI is a most important function in a mobile device on production.
So, topics related to working with native keyboards and ways of interaction with it, I consider very high priority.

@sbilstein

This comment has been minimized.

sbilstein commented Mar 6, 2018

I'm running into this issue with an app I am building. Is there a suggested workaround?

@QoLTech

This comment has been minimized.

QoLTech commented Mar 19, 2018

This is a feature that I would like as well.

Is there any workaround?

@Koseng

This comment has been minimized.

Koseng commented Mar 25, 2018

Really needed.

@franciscojunior

This comment has been minimized.

franciscojunior commented Apr 2, 2018

+1. I'm also running into this issue. Is there any workaround?

@FrantisekGazo

This comment has been minimized.

FrantisekGazo commented Apr 14, 2018

This is a really needed feature.

@FrantisekGazo

This comment has been minimized.

FrantisekGazo commented Apr 14, 2018

There is a workaround via FocusScope.

var focusNode = new FocusNode();
var TextField(focusNode: focusNode);

FocusScope.of(context).requestFocus(focusNode);

you can manually call this from the TextField#onSubmit.

But it would be great if this could be done automatically.

@wengelef

This comment has been minimized.

wengelef commented Apr 22, 2018

@FrantisekGazo
nice, also works with TextFormField#onFieldSubmitted

@adriancmurray

This comment has been minimized.

adriancmurray commented Jul 1, 2018

Glad I saw this, I was about to build my own solution to this problem. Looking forward to it being implemented. Thanks for all the work you're doing.

matthew-carroll added a commit that referenced this issue Jul 2, 2018

Support all keyboard actions. (#11344) (#18855)
* Support all keyboard actions. (#11344)

clocksmith added a commit to clocksmith/flutter that referenced this issue Jul 2, 2018

matthew-carroll added a commit that referenced this issue Jul 2, 2018

Roll engine to ad42324a62abcbc559ec8650fe2f0642c23ea3d0
flutter/engine@ad42324 Roll src/third_party/skia a219419c9d76..d818ebf4a317 (2 commits)
flutter/engine@f2eb83a Roll src/third_party/skia 00d2e8ebcb13..a219419c9d76 (1 commits)
flutter/engine@0ec7669 Roll src/third_party/skia 8451daabb23d..00d2e8ebcb13 (1 commits)
flutter/engine@061e899 Support all keyboard actions. (#11344)
flutter/engine@bc6b250 Roll src/third_party/skia 34024a7c478c..8451daabb23d (1 commits)
flutter/engine@df4dffb Roll src/third_party/skia 75e69028956d..34024a7c478c (1 commits)
flutter/engine@d8770d4 Roll src/third_party/skia cf863fb9b446..75e69028956d (1 commits)
flutter/engine@b88a8b3 Roll src/third_party/skia b7b9d02ac020..cf863fb9b446 (1 commits)
flutter/engine@2261ccf [fuchsia] Update scenic lib path.
flutter/engine@4c4ef98 [fuchsia] Rename scenic_lib => scenic
flutter/engine@f0c21f3 Roll src/third_party/skia 184d408b646b..b7b9d02ac020 (7 commits)
flutter/engine@a2bf805 Add antiAlias and saveCount to clipPath and restore
flutter/engine@9e450d1 Roll src/third_party/skia c91fe3ab1c5d..184d408b646b (10 commits)
flutter/engine@e663996 Roll src/third_party/skia eb8f8106f38c..c91fe3ab1c5d (5 commits)
flutter/engine@fecd66f Roll src/third_party/skia 723b1f6ef941..eb8f8106f38c (1 commits)
flutter/engine@4466d61 Remove vmservice_io.main from entry points.
flutter/engine@f279dfe Roll src/third_party/skia 7e2327b133db..723b1f6ef941 (1 commits)
flutter/engine@a885bd4 Roll src/third_party/skia 24d18ced1ad7..7e2327b133db (6 commits)
flutter/engine@ad1bd47 Roll src/third_party/skia a1e5630183c1..24d18ced1ad7 (7 commits)
flutter/engine@ce06bba ensure a11y state is communicated back to flutter
flutter/engine@c54a57e Roll src/third_party/skia b1b87d9df81e..a1e5630183c1 (10 commits)
flutter/engine@a9e5354 Roll src/third_party/skia 385804514edf..b1b87d9df81e (6 commits)
flutter/engine@2006e7d Roll src/third_party/skia e97bb26893a1..385804514edf (1 commits)
flutter/engine@2942061 Roll src/third_party/skia e2e52e46ca63..e97bb26893a1 (1 commits)
flutter/engine@e378811 Roll src/third_party/skia 14de25dfc7c4..e2e52e46ca63 (2 commits)
flutter/engine@48cc8f2 Roll src/third_party/skia 551dc3e91143..14de25dfc7c4 (2 commits)
flutter/engine@00ddf13 libtxt: apply an offset to drawing operations instead of translating the canvas
flutter/engine@2c5647c Roll src/third_party/skia 059a9ab4bcd0..551dc3e91143 (5 commits)
flutter/engine@9e44004 Roll src/third_party/skia 45c9dab4c3ec..059a9ab4bcd0 (8 commits)
flutter/engine@fbb3436 Remove some unused code from the Android host
flutter/engine@36f3f95 Roll src/third_party/skia 37b7e4714558..45c9dab4c3ec (1 commits)
flutter/engine@57e2e0c Roll src/third_party/skia c421ca1d6e41..37b7e4714558 (2 commits)
flutter/engine@ce417e2 Roll src/third_party/skia 5b201e3b0ba8..c421ca1d6e41 (3 commits)
flutter/engine@05f5a18 Roll src/third_party/skia d47fe095cf88..5b201e3b0ba8 (6 commits)
flutter/engine@33b70e0 Roll src/third_party/skia 9c0ce41cf711..d47fe095cf88 (12 commits)
flutter/engine@7dab419 Roll src/third_party/skia d4b2adeaa929..9c0ce41cf711 (7 commits)
flutter/engine@d3fa01a Roll src/third_party/skia f46710802ad5..d4b2adeaa929 (1 commits)

matthew-carroll added a commit that referenced this issue Jul 4, 2018

Roll engine to 21c7d6a5da47165d076928fbe460badbbead24cd (#19008)
* Roll engine to 21c7d6a5da47165d076928fbe460badbbead24cd

flutter/engine@21c7d6a Revert "Add antiAlias and saveCount to clipPath and restore (#5638)"
flutter/engine@70dcbb5 Roll src/third_party/skia d818ebf4a317..9aa30c6ee0e5 (11 commits)
flutter/engine@ad42324 Roll src/third_party/skia a219419c9d76..d818ebf4a317 (2 commits)
flutter/engine@f2eb83a Roll src/third_party/skia 00d2e8ebcb13..a219419c9d76 (1 commits)
flutter/engine@0ec7669 Roll src/third_party/skia 8451daabb23d..00d2e8ebcb13 (1 commits)
flutter/engine@061e899 Support all keyboard actions. (#11344)
flutter/engine@bc6b250 Roll src/third_party/skia 34024a7c478c..8451daabb23d (1 commits)
flutter/engine@df4dffb Roll src/third_party/skia 75e69028956d..34024a7c478c (1 commits)
flutter/engine@d8770d4 Roll src/third_party/skia cf863fb9b446..75e69028956d (1 commits)
flutter/engine@b88a8b3 Roll src/third_party/skia b7b9d02ac020..cf863fb9b446 (1 commits)
flutter/engine@2261ccf [fuchsia] Update scenic lib path.
flutter/engine@4c4ef98 [fuchsia] Rename scenic_lib => scenic
flutter/engine@f0c21f3 Roll src/third_party/skia 184d408b646b..b7b9d02ac020 (7 commits)
flutter/engine@a2bf805 Add antiAlias and saveCount to clipPath and restore
flutter/engine@9e450d1 Roll src/third_party/skia c91fe3ab1c5d..184d408b646b (10 commits)
flutter/engine@e663996 Roll src/third_party/skia eb8f8106f38c..c91fe3ab1c5d (5 commits)
flutter/engine@fecd66f Roll src/third_party/skia 723b1f6ef941..eb8f8106f38c (1 commits)
flutter/engine@4466d61 Remove vmservice_io.main from entry points.
flutter/engine@f279dfe Roll src/third_party/skia 7e2327b133db..723b1f6ef941 (1 commits)
flutter/engine@a885bd4 Roll src/third_party/skia 24d18ced1ad7..7e2327b133db (6 commits)
flutter/engine@ad1bd47 Roll src/third_party/skia a1e5630183c1..24d18ced1ad7 (7 commits)
flutter/engine@ce06bba ensure a11y state is communicated back to flutter
flutter/engine@c54a57e Roll src/third_party/skia b1b87d9df81e..a1e5630183c1 (10 commits)
flutter/engine@a9e5354 Roll src/third_party/skia 385804514edf..b1b87d9df81e (6 commits)
flutter/engine@2006e7d Roll src/third_party/skia e97bb26893a1..385804514edf (1 commits)
flutter/engine@2942061 Roll src/third_party/skia e2e52e46ca63..e97bb26893a1 (1 commits)
flutter/engine@e378811 Roll src/third_party/skia 14de25dfc7c4..e2e52e46ca63 (2 commits)
flutter/engine@48cc8f2 Roll src/third_party/skia 551dc3e91143..14de25dfc7c4 (2 commits)
flutter/engine@00ddf13 libtxt: apply an offset to drawing operations instead of translating the canvas
flutter/engine@2c5647c Roll src/third_party/skia 059a9ab4bcd0..551dc3e91143 (5 commits)
flutter/engine@9e44004 Roll src/third_party/skia 45c9dab4c3ec..059a9ab4bcd0 (8 commits)
flutter/engine@fbb3436 Remove some unused code from the Android host
flutter/engine@36f3f95 Roll src/third_party/skia 37b7e4714558..45c9dab4c3ec (1 commits)
flutter/engine@57e2e0c Roll src/third_party/skia c421ca1d6e41..37b7e4714558 (2 commits)
flutter/engine@ce417e2 Roll src/third_party/skia 5b201e3b0ba8..c421ca1d6e41 (3 commits)
flutter/engine@05f5a18 Roll src/third_party/skia d47fe095cf88..5b201e3b0ba8 (6 commits)
flutter/engine@33b70e0 Roll src/third_party/skia 9c0ce41cf711..d47fe095cf88 (12 commits)
flutter/engine@7dab419 Roll src/third_party/skia d4b2adeaa929..9c0ce41cf711 (7 commits)
flutter/engine@d3fa01a Roll src/third_party/skia f46710802ad5..d4b2adeaa929 (1 commits)

cbracken added a commit to cbracken/flutter that referenced this issue Jul 11, 2018

Roll engine to fed2ea458ed49088d33eddabc546ba56d600c717
Includes:
* flutter/engine@fed2ea4 Revert "Remove vmservice_io.main from entry points. (flutter#5625)" (flutter#5711)
* flutter/engine@958d2cf Remove trailing white spaces (flutter#5708)
* flutter/engine@6db0cc9 Roll src/third_party/skia 1d784ceafa9e..c69c4410be7d (13 commits) (flutter#5709)
* flutter/engine@4945624 Roll src/third_party/skia 418e658a6922..1d784ceafa9e (10 commits) (flutter#5707)
* flutter/engine@cb27dab Roll src/third_party/skia 6d98257725b5..418e658a6922 (1 commits) (flutter#5706)
* flutter/engine@2981cc7 Roll src/third_party/skia e0a9962b12ad..6d98257725b5 (1 commits) (flutter#5704)
* flutter/engine@ad41972 Roll src/third_party/skia 8fe31406e980..e0a9962b12ad (3 commits) (flutter#5703)
* flutter/engine@3b6dedb Add anti-alias switch to canvas clip calls (flutter#5670)
* flutter/engine@d9a831c Roll dart to 84ca27a09ebd6a65cd23ee52d835d89cbe06c574. (flutter#5700)
* flutter/engine@d5fce84 revert change to app delegate that wont build on earlier xcodes (flutter#5702)
* flutter/engine@45db8f7 Roll src/third_party/skia d48897b576e9..8fe31406e980 (4 commits) (flutter#5701)
* flutter/engine@d217a95 Remove cullRect calculation on TransformLayers with a perspective transform. (flutter#5693)
* flutter/engine@13d801a Roll src/third_party/skia 1354048c8fa8..d48897b576e9 (8 commits) (flutter#5699)
* flutter/engine@1644f35 Roll src/third_party/skia 373224c9ab3a..1354048c8fa8 (1 commits) (flutter#5698)
* flutter/engine@4da7d44 Roll src/third_party/skia a391c72a2057..373224c9ab3a (1 commits) (flutter#5697)
* flutter/engine@a36207f Roll src/third_party/skia 0dd98a59df63..a391c72a2057 (1 commits) (flutter#5696)
* flutter/engine@cf14ca0 Roll src/third_party/skia a717ca970b25..0dd98a59df63 (1 commits) (flutter#5695)
* flutter/engine@89cd29f Roll src/third_party/skia dd962a95c5f2..a717ca970b25 (1 commits) (flutter#5694)
* flutter/engine@f52955c Roll src/third_party/skia bcc3aec00422..dd962a95c5f2 (1 commits) (flutter#5692)
* flutter/engine@6e65122 Roll src/third_party/skia 4f6ea65f66c9..bcc3aec00422 (2 commits) (flutter#5691)
* flutter/engine@e334768 Roll src/third_party/skia a50205fca5f7..4f6ea65f66c9 (2 commits) (flutter#5690)
* flutter/engine@8aa9a81 Roll src/third_party/skia 6667fb123911..a50205fca5f7 (3 commits) (flutter#5689)
* flutter/engine@3c4bf8d Roll src/third_party/skia 3d3d8841ff86..6667fb123911 (1 commits) (flutter#5688)
* flutter/engine@f5f15b7 Roll src/third_party/skia b95bbba308b9..3d3d8841ff86 (1 commits) (flutter#5687)
* flutter/engine@31bd1e2 Roll src/third_party/skia 20b824d9fe49..b95bbba308b9 (1 commits) (flutter#5686)
* flutter/engine@37e96b9 Roll src/third_party/skia 53f5db5e9833..20b824d9fe49 (1 commits) (flutter#5685)
* flutter/engine@b04fc96 Roll src/third_party/skia 3f2d909d7029..53f5db5e9833 (1 commits) (flutter#5683)
* flutter/engine@686ee99 Roll src/third_party/skia 9eb1c7d80fb3..3f2d909d7029 (1 commits) (flutter#5682)
* flutter/engine@936a38d Roll src/third_party/skia 44bad2e86a01..9eb1c7d80fb3 (1 commits) (flutter#5681)
* flutter/engine@6f87886 Roll src/third_party/skia e72c144af687..44bad2e86a01 (1 commits) (flutter#5680)
* flutter/engine@23ae68d Roll src/third_party/skia a93486b095ea..e72c144af687 (1 commits) (flutter#5679)
* flutter/engine@c6ab9b9 Roll src/third_party/skia 5788bb9af9ad..a93486b095ea (1 commits) (flutter#5678)
* flutter/engine@aa4afc1 Roll src/third_party/skia 9b80bd5f16e6..5788bb9af9ad (1 commits) (flutter#5677)
* flutter/engine@9f9c062 Roll src/third_party/skia cdefa23a23cf..9b80bd5f16e6 (1 commits) (flutter#5676)
* flutter/engine@4128a79 Roll src/third_party/skia 233c65202e69..cdefa23a23cf (1 commits) (flutter#5675)
* flutter/engine@74dc963 Roll src/third_party/skia 6784ffa78e70..233c65202e69 (1 commits) (flutter#5674)
* flutter/engine@5724faf ensure that bridge is not destroyed when semantics is still enabled (flutter#5672)
* flutter/engine@24af9ca [fuchsia] Update gn label for fuchsia.ui.scenic (flutter#5673)
* flutter/engine@d085f1d Do not make an extra submit callback during SurfaceFrame destruction if the frame was already submitted (flutter#5669)
* flutter/engine@b663010 Roll src/third_party/skia 58a1605d2b9b..6784ffa78e70 (8 commits) (flutter#5671)
* flutter/engine@2b890c8 Roll src/third_party/skia 34aa059c1502..58a1605d2b9b (6 commits) (flutter#5667)
* flutter/engine@2a88ecf Roll src/third_party/skia 94d57c477fe1..34aa059c1502 (8 commits) (flutter#5666)
* flutter/engine@51785d2 Remove unused Java imports (flutter#5663)
* flutter/engine@b157d4f Roll dart sdk to 64641d014b77bd410e9aa10558522ae26e4210ee (flutter#5610)
* flutter/engine@d05225e Roll src/third_party/skia d7425b58df89..94d57c477fe1 (1 commits) (flutter#5665)
* flutter/engine@32736d5 Roll src/third_party/skia a22d924763ab..d7425b58df89 (4 commits) (flutter#5664)
* flutter/engine@0fca444 Roll src/third_party/skia ef21d7e47963..a22d924763ab (3 commits) (flutter#5662)
* flutter/engine@a7d0f29 Roll src/third_party/skia 9aa30c6ee0e5..ef21d7e47963 (5 commits) (flutter#5661)
* flutter/engine@21c7d6a Revert "Add antiAlias and saveCount to clipPath and restore (flutter#5638)" (flutter#5660)
* flutter/engine@70dcbb5 Roll src/third_party/skia d818ebf4a317..9aa30c6ee0e5 (11 commits) (flutter#5658)
* flutter/engine@ad42324 Roll src/third_party/skia a219419c9d76..d818ebf4a317 (2 commits) (flutter#5657)
* flutter/engine@f2eb83a Roll src/third_party/skia 00d2e8ebcb13..a219419c9d76 (1 commits) (flutter#5655)
* flutter/engine@0ec7669 Roll src/third_party/skia 8451daabb23d..00d2e8ebcb13 (1 commits) (flutter#5654)
* flutter/engine@061e899 Support all keyboard actions. (flutter#11344) (flutter#5620)
* flutter/engine@bc6b250 Roll src/third_party/skia 34024a7c478c..8451daabb23d (1 commits) (flutter#5653)
* flutter/engine@df4dffb Roll src/third_party/skia 75e69028956d..34024a7c478c (1 commits) (flutter#5652)
* flutter/engine@d8770d4 Roll src/third_party/skia cf863fb9b446..75e69028956d (1 commits) (flutter#5651)
* flutter/engine@b88a8b3 Roll src/third_party/skia b7b9d02ac020..cf863fb9b446 (1 commits) (flutter#5650)
* flutter/engine@2261ccf [fuchsia] Update scenic lib path. (flutter#5649)
* flutter/engine@4c4ef98 [fuchsia] Rename scenic_lib => scenic (flutter#5648)
* flutter/engine@f0c21f3 Roll src/third_party/skia 184d408b646b..b7b9d02ac020 (7 commits) (flutter#5646)
* flutter/engine@a2bf805 Add antiAlias and saveCount to clipPath and restore (flutter#5638)
* flutter/engine@9e450d1 Roll src/third_party/skia c91fe3ab1c5d..184d408b646b (10 commits) (flutter#5645)
* flutter/engine@e663996 Roll src/third_party/skia eb8f8106f38c..c91fe3ab1c5d (5 commits) (flutter#5644)
* flutter/engine@fecd66f Roll src/third_party/skia 723b1f6ef941..eb8f8106f38c (1 commits) (flutter#5643)
* flutter/engine@4466d61 Remove vmservice_io.main from entry points. (flutter#5625)
* flutter/engine@f279dfe Roll src/third_party/skia 7e2327b133db..723b1f6ef941 (1 commits) (flutter#5642)
* flutter/engine@a885bd4 Roll src/third_party/skia 24d18ced1ad7..7e2327b133db (6 commits) (flutter#5641)
* flutter/engine@ad1bd47 Roll src/third_party/skia a1e5630183c1..24d18ced1ad7 (7 commits) (flutter#5639)

@Hixie Hixie modified the milestones: bucket6, bucket7 Jul 17, 2018

@estavex

This comment has been minimized.

estavex commented Jul 22, 2018

Is this feature gonna be implemented soon? It's been over a year since this thread was posted

@jogboms

This comment has been minimized.

jogboms commented Jul 23, 2018

@estavex follow the thread, the complete milestone is only a few more commits away. For now, you can utilize a combination of focusNode, textInputAction and onEditingComplete on the TextFields to get the desired effect before this lands.

@escamoteur

This comment has been minimized.

Contributor

escamoteur commented Jul 23, 2018

@matthew-carroll how will it be implemented as API?

@matthew-carroll

This comment has been minimized.

Contributor

matthew-carroll commented Jul 23, 2018

@estavex @escamoteur - As @slightfoot mentioned, the ability to change the action button on the keyboard is implemented.

Automatic focus change is a much larger and more intricate issue. I'm not sure when that work will be completed. It requires implementing a focus navigation tree that operates as a subset of the semantic accessibility tree. In the meantime, as @jogboms pointed out, you can manually switch focus either in onEditingComplete or onSubmitted, depending on your use-case.

@matthew-carroll

This comment has been minimized.

Contributor

matthew-carroll commented Jul 24, 2018

@Hixie I noticed this ticket is in Bucket 7 milestone. Should we split this ticket into 2? The easy part is done. The hard part will take significant time and will definitely not make it into Bucket 7's completion date.

@Hixie Hixie modified the milestones: bucket7, Goals Jul 24, 2018

@Hixie

This comment has been minimized.

Contributor

Hixie commented Jul 24, 2018

Current status is that this can be implemented manually in apps that want it. We intend to make this automatic eventually but do not currently have a plan for how to do that.

@escamoteur

This comment has been minimized.

Contributor

escamoteur commented Jul 31, 2018

Perhaps I'm just naive, but as far as I understand it all FormFields register at there surrounding Form or not? Why not allow any FormField to have an index value that defines the sequence of the focus like we did in good old MS mfc? Then onNext could just ask the surounding Form where to move the focus.

@timsneath I think this is an absolute critical feature before 1.0 for all business like Apps that have a lot of Form entries.

@matthew-carroll

This comment has been minimized.

Contributor

matthew-carroll commented Jul 31, 2018

We shouldn't solve focus for forms and nothing else. Focus is a general UI behavior that needs to work in general. All focusable widgets need to participate in focus navigation. Moreover, that focus navigation needs to default to the same traversal as the semantics tree (but then can be customized by the developer). And beyond that, the situation isn't as simple as next/previous. There is also up/down/left/right which is necessary for d-pad devices.

I think creating an API just for forms and just for 1.0 is a mistake.

As has been mentioned, focus navigation can be implemented manually. It might be a little more work for right now, but there is nothing preventing any form focus order traversal that you'd like. You just need to utilize FocusNodes.

I think we need to treat this like any other yak shave and really dig to the core of the focus navigation issue and solve it in general.

CC @timsneath @Hixie @goderbauer

@matthew-carroll

This comment has been minimized.

Contributor

matthew-carroll commented Jul 31, 2018

Also, another thought, @escamoteur @slightfoot, you could throw together a community library that wraps form fields with this extended API. If all you need is the index control you mentioned then I'm guessing it's not a lot of work. Then that community library can hold people over until the framework catches up. When the framework reaches general focus navigation, you can deprecate that library. But we shouldn't do this with the framework because we'll never be able to get rid of the exposed API.

@Hixie

This comment has been minimized.

Contributor

Hixie commented Jul 31, 2018

not every form field is registered with the form (e.g. if it's in a ListView but currently off screen)

@Hixie

This comment has been minimized.

Contributor

Hixie commented Oct 2, 2018

This is on our near-term radar.

@Hixie Hixie modified the milestones: Goals, bucket14, bucket13 Oct 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment