Repository navigation
[Android] Hot restart while keyboard is up leaves the keyboard up #10713
Copy link
Copy link
Open
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.16Found to occur in 3.16Found to occur in 3.16found in release: 3.19Found to occur in 3.19Found to occur in 3.19frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyAndroid applications specificallyt: hot reloadReloading code during "flutter run"Reloading code during "flutter run"team-androidOwned by Android platform teamOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
Background
The keyboard should reset on hot restart on Android.
Work
Necessary changes:
- Update the Android embedder to hide the keyboard on hot restart
- Update the keyboard_hot_restart integration test to run on Android
See also
- Corresponding iOS fix: [iOS] Hide keyboard on hot restart #167013
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.16Found to occur in 3.16Found to occur in 3.16found in release: 3.19Found to occur in 3.19Found to occur in 3.19frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyAndroid applications specificallyt: hot reloadReloading code during "flutter run"Reloading code during "flutter run"team-androidOwned by Android platform teamOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-androidTriaged by Android platform teamTriaged by Android platform team
Activity
eseidelGoogle commentedon Jun 15, 2017
This is likely related to the question of teaching plugins about hot-restart/hot-reload #10437
eseidelGoogle commentedon Jun 27, 2017
@wmleler and @LarkAscending just ran into this.
wmleler commentedon Jun 27, 2017
Not only that, but the left-up keyboard doesn't work (typing on it doesn't put characters into the input field. In addition, I'm seeing hot reload fail. I am going to add a new bug with instructions on how to duplicate this. So this bug will be redundant. The new bug is #11011
[-]Hot restart while keyboard is up leaves the keyboard up (Android)[/-][+]Hot restart while keyboard is up leaves the keyboard up[/+]cbracken commentedon Feb 6, 2018
I've updated the title/labelling to clarify that this is an issue on both Android and iOS. The general issue is that the engine itself doesn't currently have any means of cleaning up on hot restarts. A general solution would also include support for signalling plugins that a hot restart has occurred.
sigurdm commentedon Feb 6, 2018
In the https://github.com/flutter/plugins/blob/master/packages/video_player/lib/video_player.dart video player plugin I send an "init" message in the initializer of the field holding the MessageChannel to the plugin.
When the plugin receives the "init" message it resets its state.
I believe this pattern could work for the keyboard as well.
63 remaining items
flutter-triage-bot commentedon Jan 29, 2026
This issue is assigned to @loic-sharma but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
flutter-triage-bot commentedon Apr 16, 2026
This issue was assigned to @loic-sharma but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.
[-][iOS/Android] Hot restart while keyboard is up leaves the keyboard up[/-][+][Android] Hot restart while keyboard is up leaves the keyboard up[/+]loic-sharma commentedon Apr 23, 2026
I updated this issue to reflect the latest state: this was fixed on iOS by #167013, but still needs to be addressed on Android.
Necessary changes:
Fix keyboard_hot_restart_ios flakes (#168518)