Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kalucky0 opened this issue May 17, 2024 · 9 comments
Closed

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

kalucky0 opened this issue May 17, 2024 · 9 comments
Labels
r: fixed Issue is closed as already fixed in a newer version

Comments

@kalucky0
Copy link

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!
@devunt
Copy link

devunt commented May 18, 2024

Seems like regression of #92053, #96242.

@intelryzen
Copy link

intelryzen commented May 18, 2024

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

@jonmountjoy
Copy link

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

@katunins
Copy link

have same issue
flutter - 3.22.0

@wyqlxf
Copy link
Contributor

wyqlxf commented May 20, 2024

@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

@huycozy huycozy added the in triage Presently being triaged by the triage team label May 20, 2024
@huycozy
Copy link
Member

huycozy commented May 20, 2024

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.

@huycozy huycozy closed this as completed May 20, 2024
@huycozy huycozy added r: fixed Issue is closed as already fixed in a newer version and removed in triage Presently being triaged by the triage team labels May 20, 2024
AlienKevin added a commit to AlienKevin/wordshk_app that referenced this issue May 22, 2024
Known issue with Flutter 3.20.0 on TextField keyboard & focus. This causes search bar to be untypable after swiping back from EntryPage: flutter/flutter#148573
flutter/flutter#96766
@jonmountjoy
Copy link

@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.

@huycozy
Copy link
Member

huycozy commented May 24, 2024

@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.

@techouse
Copy link

techouse commented May 28, 2024

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 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
r: fixed Issue is closed as already fixed in a newer version
Projects
None yet
Development

No branches or pull requests

8 participants