Repository navigation
Unable to type in TextField after exiting screen with swipe gesture #148573
Copy link
Copy link
Closed
Labels
r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
Steps to reproduce
- Create a Flutter app with two screens: Screen A and Screen B.
- Screen A contains a
TextField. - Navigate from Screen A to Screen B.
- Swipe from the left edge of Screen B to navigate back to Screen A.
- 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
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!Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Activity
devunt commentedon May 18, 2024
Seems like regression of #92053, #96242.
intelryzen commentedon May 18, 2024
It seems to work well in Flutter master version (3.22.0-36.0.pre.48).
jonmountjoy commentedon May 18, 2024
Will there be a hot fix for this? It breaks a lot things. (Thanks for reporting).
katunins commentedon May 19, 2024
have same issue
flutter - 3.22.0
wyqlxf commentedon 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 commentedon May 20, 2024
Thank you for the report.
There seem to be two issues here:
unable to enter textandTextField is not auto focusedwhen 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 textissue. The fix should land on the stable channel in future releases.Use fvm to lock Flutter version to 3.19.6
jonmountjoy commentedon May 24, 2024
@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 commentedon 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 commentedon 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 🤞
github-actions commentedon Jun 11, 2024
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 -vand a minimal reproduction of the issue.