Skip to content

[Android] Hot restart while keyboard is up leaves the keyboard up #10713

Open

Description

@Hixie

Background

The keyboard should reset on hot restart on Android.

Work

Necessary changes:

  1. Update the Android embedder to hide the keyboard on hot restart
  2. Update the keyboard_hot_restart integration test to run on Android

See also

Activity

  1. added
    a: text inputEntering text in a text field or keyboard related problems
    platform-androidAndroid applications specifically
    on Jun 15, 2017
  2. added this to the milestone on Jun 15, 2017
  3. eseidelGoogle commented on Jun 15, 2017

    @eseidelGoogle
    Contributor

    This is likely related to the question of teaching plugins about hot-restart/hot-reload #10437

  4. eseidelGoogle commented on Jun 27, 2017

    @eseidelGoogle
    Contributor

    @wmleler and @LarkAscending just ran into this.

  5. wmleler commented on Jun 27, 2017

    @wmleler

    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

  6. changed the title [-]Hot restart while keyboard is up leaves the keyboard up (Android)[/-] [+]Hot restart while keyboard is up leaves the keyboard up[/+] on Feb 6, 2018
  7. cbracken commented on Feb 6, 2018

    @cbracken
    Member

    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.

  8. sigurdm commented on Feb 6, 2018

    @sigurdm
    Contributor

    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.

    final MethodChannel _channel = const MethodChannel('flutter.io/videoPlayer')
      // This will clear all open videos on the platform when a full restart is
      // performed.
      ..invokeMethod("init");

    When the plugin receives the "init" message it resets its state.

      switch (call.method) {
          case "init":
            for (VideoPlayer player : videoPlayers.values()) {
              player.dispose();
            }
            videoPlayers.clear();
            break;

    I believe this pattern could work for the keyboard as well.

  9. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    engineflutter/engine related. See also e: labels.
    on Dec 4, 2018
  10. 63 remaining items

  11. added
    ⏳Bot is counting down the days until it unassigns the issue
    on Jan 29, 2026
  12. flutter-triage-bot commented on Jan 29, 2026

    @flutter-triage-bot

    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!

  13. flutter-triage-bot commented on Apr 16, 2026

    @flutter-triage-bot

    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.

  14. removed
    ⏳Bot is counting down the days until it unassigns the issue
    on Apr 16, 2026
  15. changed the title [-][iOS/Android] Hot restart while keyboard is up leaves the keyboard up[/-] [+][Android] Hot restart while keyboard is up leaves the keyboard up[/+] on Apr 23, 2026
  16. added
    team-androidOwned by Android platform team
    and removed
    platform-iosiOS applications specifically
    fyi-androidFor the attention of Android platform team
    on Apr 23, 2026
  17. loic-sharma commented on Apr 23, 2026

    @loic-sharma
    Member

    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:

    1. Update the Android embedder to hide the keyboard on hot restart
    2. Update the keyboard_hot_restart integration test to run on Android
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: text inputEntering text in a text field or keyboard related problemsengineflutter/engine related. See also e: labels.found in release: 3.16Found to occur in 3.16found in release: 3.19Found to occur in 3.19frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyt: hot reloadReloading code during "flutter run"team-androidOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions