Repository navigation
Keep TextFields visible when keyboard comes up - #18291
Conversation
| _updateOrDisposeSelectionOverlayIfNeeded(); | ||
| if (!_hasFocus) { | ||
| if (_hasFocus) { | ||
| // Listen for changing viewInsets, which indicates keyboard showing up. |
There was a problem hiding this comment.
Couldn't something else do that, like rotating the screen, or a "virtual" safe area element (like the iOS bottom button) disappearing? I suppose we probably want this to happen in those cases too, however.
There was a problem hiding this comment.
Yes, this will be triggered by the events you list as well. I'd argue that you'd still want to ensure that a focused textfield stays visible when any of those happen.
* master: Remove race conditions involving finding available ports (flutter#18488) Skip painting hidden children of a sliver list (flutter#18465) Fixed some typos (flutter#18516) update Tristate checkbox semantics to consider indeterminate as "unchecked" (flutter#18297) Add flutter tool support for creating app-specific VM snapshots. (flutter#18417) mention Text.rich on RichText (flutter#18434) invert children for real (flutter#18489) Fix clipping for SliverLists (flutter#18410) Keep TextFields visible when keyboard comes up (flutter#18291) Update all packages (flutter#18506) Prepare for upgrading video player in Gallery to newest version (flutter#18501) Update Android dependencies (flutter#18499) Enable running with prebuilt test-only apk (flutter#18453) Revert "Update all packages (flutter#18471)" (flutter#18492) Add some more dart doc to RepaintBoundary (flutter#17183) Update all packages (flutter#18471) Clean up output of "flutter run --release" (flutter#18380) Ensure errors launching emulators are exposed to the daemon (flutter#18446) Check video widget is mounted on call to setState (flutter#18467) Fixed concurrent list modification in vmservice.dart
|
@Aklil are you creating the |
|
@zoechi yes I've them in a listview. Depending on the data I receive from an API, I build the input fields with TextEditingControllers. |
|
|
|
@zoechi I have created the controllers in the |
|
@zoechi Creating the global form key outside of the build method has resolved my issue. But I wanted to know whether it is a normal situation for the tree to be re-rendered when the text field is being focused and up on keyboard enter in the input. Thanks for your help. |

Fixes #10826.
Also in this PR: If you focus a text field, scroll it out of view and then start typing it will scroll back into view.