Only show the keyboard when the user explicitly focuses an Input.#6713
Only show the keyboard when the user explicitly focuses an Input.#6713mpcomplete merged 1 commit intoflutter:masterfrom mpcomplete:keyboard
Conversation
|
This breaks autofocus, right? LGTM, ideally with a test, if breaking autofocus is intentional. Now that we only want to show the keyboard in response to use action, though, maybe we should just literally do it onTap, rather than messing with build and so on. |
|
The reason I did it in 2 steps is this comment: https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/editable.dart#L301 . This implies that attempting to acquire focus may fail. I suppose it would break autofocus - or at least, prevent the keyboard from showing for an autofocused widget, until you tap it. I'm not sure what the correct behavior is. I don't know of any examples of autofocused text fields in other material apps. |
|
Yeah maybe we should just rip the autofocus idea out entirely. You're right about the showing the keyboard after getting focus thing. Not sure what we can really do to make that better... |
|
This shouldn't have landed, since Travis was red for this PR. Please don't land PRs unless Travis is green and the waterfall is showing no problems. |
Fixes #6603