Skip to content

Unable to type in TextField after exiting screen with swipe gesture #148573

Closed

Description

@kalucky0

Steps to reproduce

  1. Create a Flutter app with two screens: Screen A and Screen B.
  2. Screen A contains a TextField.
  3. Navigate from Screen A to Screen B.
  4. Swipe from the left edge of Screen B to navigate back to Screen A.
  5. Try to type in the TextField on Screen A.

Expected results

The keyboard should appear when the TextField on Screen A is focused, allowing the user to type.

Actual results

The keyboard does not appear, and it is impossible to type in the TextField on Screen A after returning from Screen B using the swipe gesture.

Code sample

DartPad code sample

Screenshots or Video

Screenshots / Video demonstration
Screen.Recording.2024-05-17.at.22.05.19.mov

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.22.0, on macOS 14.4.1 23E224 darwin-arm64, locale en-PL)
    • Flutter version 3.22.0 on channel stable at /opt/homebrew/Caskroom/flutter/3.13.6/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5dcb86f68f (8 days ago), 2024-05-09 07:39:20 -0500
    • Engine revision f6344b75dc
    • Dart version 3.4.0
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/kalucky/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Users/kalucky/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge

[✓] Android Studio (version 2023.3)
    • Android Studio at /Users/kalucky/Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] IntelliJ IDEA Ultimate Edition (version 2024.1.1)
    • IntelliJ at /Users/kalucky/Applications/IntelliJ IDEA Ultimate.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.89.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.88.0

[✓] Connected device (4 available)
    • iPhone 15 Pro Max (mobile)      • D6D43369-2C83-4CB7-B2C3-C6BEA3CFCEFF • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)
    • macOS (desktop)                 • macos                                • darwin-arm64   • macOS 14.4.1 23E224 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 14.4.1 23E224 darwin-arm64
    • Chrome (web)                    • chrome                               • web-javascript • Microsoft Edge 122.0.2365.92

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Activity

  1. devunt commented on May 18, 2024

    @devunt

    Seems like regression of #92053, #96242.

  2. intelryzen commented on May 18, 2024

    @intelryzen

    It seems to work well in Flutter master version (3.22.0-36.0.pre.48).

  3. jonmountjoy commented on May 18, 2024

    @jonmountjoy
    Contributor

    Will there be a hot fix for this? It breaks a lot things. (Thanks for reporting).

  4. katunins commented on May 19, 2024

    @katunins

    have same issue
    flutter - 3.22.0

  5. wyqlxf commented on May 20, 2024

    @wyqlxf
    Contributor

    @intelryzen Yes, It seems to work well in Flutter master version (3.22.0-33.0.pre) too.
    https://github.com/flutter/flutter/assets/42757204/94e1616c-cbec-4902-be38-0c07ad19762d

  6. added
    in triagePresently being triaged by the triage team
    on May 20, 2024
  7. huycozy commented on May 20, 2024

    @huycozy
    Member

    Thank you for the report.
    There seem to be two issues here: unable to enter text and TextField is not auto focused when swiping back to previous page.

    • For the 1st issue: I also see it's unable to enter text when using swipe gesture back to previous screen on Flutter stable channel 3.22.0. But it seems to be fixed partly on master channel (3.22.0-36.0.pre.54) as I can refocus and enter text on the field.
      I also tested this on the previous stable release 3.19.6: the result is the same on Flutter master channel.

    • For the 2nd issue: I see there's an open issue addressing this case at TextField is not focused when returning to page using swipe back gesture #96766. So please follow up on it for updates.

    I will mark this as fixed on the latest Flutter master channel for unable to enter text issue. The fix should land on the stable channel in future releases.

  8. added
    r: fixedIssue is closed as already fixed in a newer version
    and removed
    in triagePresently being triaged by the triage team
    on May 20, 2024
  9. jonmountjoy commented on May 24, 2024

    @jonmountjoy
    Contributor

    @huycozy any idea when this (at least the 1st issue you reference above) will land? I would have thought such a serious regression would appear in a hot fix, but I see a hot fix just went out without this.

  10. huycozy commented on May 24, 2024

    @huycozy
    Member

    @jonmountjoy It will take a couple of months to land stable fixes to release channels. You can read more about the build release channels here https://github.com/flutter/flutter/wiki/Flutter-build-release-channels. If you can find the related PR that fixed the 1st issue, you can submit a Request a cherry-pick.

  11. techouse commented on May 28, 2024

    @techouse
    Contributor

    Looks like this was fixed in 3.22.0-19.0.pre as it is broken in 3.22.0-18.0.pre.

    I've made a CP request to add this to stable #149178 🤞

  12. github-actions commented on Jun 11, 2024

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  13. locked as resolved and limited conversation to collaborators on Jun 11, 2024
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

    r: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions