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

Text selection magnifier freezes, causing the TextField to prevent input after closing the keyboard on the iPad #145751

Open
hohoins opened this issue Mar 26, 2024 · 11 comments
Labels
a: text input Entering text in a text field or keyboard related problems found in release: 3.19 Found to occur in 3.19 found in release: 3.21 Found to occur in 3.21 has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list platform-ios iOS applications specifically team-text-input Owned by Text Input team triaged-text-input Triaged by Text Input team

Comments

@hohoins
Copy link

hohoins commented Mar 26, 2024

Steps to reproduce

  1. Enter a few characters of text in TextField
  2. Select a letter by long pressing it in the TextField
  3. Press the back button on the keyboard to delete a letter
  4. Close the keyboard with the down button at the bottom right of the keyboard.
  5. TextField does not respond when touched

If reproduction is not possible, repeat the above process.
In my case, it was possible to reproduce it within 10 times.
If I put my mind to it, I can 100% reproduce it.

environment

It can be reproduced on actual iOS devices.

  • iPad 17.4.1 (real device)
  • iPad Pro 11 (3rd gen)
  • Flutter 3.19.3

Expected results

When I touch the TextField it should be focused.

Actual results

When I touch the TextField, nothing happens.

Code sample

code: https://github.com/hohoins/flutter_text_field_issue/blob/main/lib/main.dart
repo: https://github.com/hohoins/flutter_text_field_issue

Code sample
class BugScreen extends StatelessWidget {
  const BugScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        children: <Widget>[
          const SizedBox(height: 100),
          const Text('TextField issue'),
          const SizedBox(width: 400, child: TextField()),  // << Just adding a TextField causes bugs.
          const SizedBox(height: 50),
          ElevatedButton(
            onPressed: () {},
            child: const Text('Test button'),
          ),
        ],
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
re.mov

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
flutter doctor -v
[✓] Flutter (Channel stable, 3.19.3, on macOS 14.3.1 23D60 darwin-arm64, locale ko-KR)
    • Flutter version 3.19.3 on channel stable at /Users/user/.fenv/versions/3.19.3
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ba39319843 (3 weeks ago), 2024-03-07 15:22:21 -0600
    • Engine revision 2e4ba9c6fb
    • Dart version 3.3.1
    • DevTools version 2.31.1

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

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

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
    • Android Studio at /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.9+0-17.0.9b1087.7-11185874)

[✓] Android Studio (version 2022.1)
    • Android Studio at /Applications/Android Studio E.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 11.0.15+0-b2043.56-8887301)

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

[✓] Connected device (4 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554             • android-arm64  • Android 13 (API 33) (emulator)
    • iPad (mobile)               • 00008103-000240621A30C01E • ios            • iOS 17.4.1 21E236
    • macOS (desktop)             • macos                     • darwin-arm64   • macOS 14.3.1 23D60 darwin-arm64
    • Chrome (web)                • chrome                    • web-javascript • Google Chrome 123.0.6312.59

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

• No issues found!
@huycozy huycozy added the in triage Presently being triaged by the triage team label Mar 27, 2024
@huycozy
Copy link
Member

huycozy commented Mar 27, 2024

Hi @hohoins
I checked the issue using iPad Pro, 4th gen, iOS 17.2 (simulator) but can't reproduce it on Flutter stable channel 3.19.4. I wonder if the issue only occurs on a physical device, so could you create a simulator and confirm?

Also, does the issue only occur with Korea text? Could you check this using English text?

@huycozy huycozy added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Mar 27, 2024
@hohoins
Copy link
Author

hohoins commented Mar 27, 2024

Hi @hohoins I checked the issue using iPad Pro, 4th gen, iOS 17.2 (simulator) but can't reproduce it on Flutter stable channel 3.19.4. I wonder if the issue only occurs on a physical device, so could you create a simulator and confirm?

Also, does the issue only occur with Korea text? Could you check this using English text?

@huycozy
Thank you so much for your response.
Let’s check it out in flutter 3.19.4.
This also happens in English. I will attach a video when it is reproduced.
And it can only be reproduced on actual iPad devices.
However, I will try again in the simulator and get back to you.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Mar 27, 2024
@huycozy huycozy added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Mar 28, 2024
@hohoins
Copy link
Author

hohoins commented Mar 28, 2024

@huycozy
I set the system language settings and keyboard language to English.
It doesn't seem to have much to do with language settings.
flutter 3.19.4, iOS 17.4.1 was reproduced on an actual device.

It cannot be reproduced in the iOS simulator.
(simulators: iOS 15.5, iOS 16.2, iOS 17.4)

A new reproduction video has been attached again.
thank you

Reproduction path:

  1. Enter a few characters of text in TextField.
  2. Long press the text in TextField.
  3. When the magnifying glass is visible, the reproduction begins.
  4. Close the keyboard by pressing the close keyboard button.
  5. When I touch the TextField, there is no response.
test.mp4

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.4, on macOS 14.3.1 23D60 darwin-arm64, locale ko-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] Android Studio (version 2022.1)
[✓] VS Code (version 1.87.2)
[✓] Connected device (3 available)
! Error: Browsing on the local area network for iPad. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

• No issues found!

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Mar 28, 2024
@huycozy
Copy link
Member

huycozy commented Mar 29, 2024

Thanks for the clear steps. I can reproduce the issue as well on iPad Air 5 (iPadOS 17.2).

flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.19.5, on macOS 14.1 23B74 darwin-x64, locale en-VN)
    • Flutter version 3.19.5 on channel stable at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 300451adae (25 hours ago), 2024-03-27 21:54:07 -0500
    • Engine revision e76c956498
    • Dart version 3.3.3
    • DevTools version 2.31.1

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

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

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
    • Android Studio at /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
    • android-studio-dir = /Applications/Android Studio.app/
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

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

[✓] Connected device (3 available)
    • Pixel 7 (mobile) • 2B171FDH20084L • android-arm64  • Android 14 (API 34)
    • macOS (desktop)  • macos          • darwin-x64     • macOS 14.1 23B74 darwin-x64
    • Chrome (web)     • chrome         • web-javascript • Google Chrome 123.0.6312.86

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

• No issues found!
[!] Flutter (Channel master, 3.21.0-17.0.pre.24, on macOS 14.1 23B74 darwin-x64, locale en-VN)
    • Flutter version 3.21.0-17.0.pre.24 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 1a2f34ab5b (63 minutes ago), 2024-03-28 19:39:17 -0700
    • Engine revision 68aa9ba386
    • Dart version 3.4.0 (build 3.4.0-282.0.dev)
    • DevTools version 2.34.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

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

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

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
    • Android Studio at /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
    • android-studio-dir = /Applications/Android Studio.app/
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

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

[✓] Connected device (3 available)
    • Pixel 7 (mobile) • 2B171FDH20084L • android-arm64  • Android 14 (API 34)
    • macOS (desktop)  • macos          • darwin-x64     • macOS 14.1 23B74 darwin-x64
    • Chrome (web)     • chrome         • web-javascript • Google Chrome 123.0.6312.86

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

! Doctor found issues in 1 category.

@hohoins
Copy link
Author

hohoins commented Mar 29, 2024

@huycozy
Thank you for contacting us.
The issue has been reproduced.
I hope this fixes the TextField freezing issue.
👍👍👍👍👍

@huycozy huycozy added a: text input Entering text in a text field or keyboard related problems platform-ios iOS applications specifically has reproducible steps The issue has been confirmed reproducible and is ready to work on fyi-ios For the attention of iOS platform team found in release: 3.19 Found to occur in 3.19 team-text-input Owned by Text Input team found in release: 3.21 Found to occur in 3.21 and removed in triage Presently being triaged by the triage team labels Mar 29, 2024
@huycozy huycozy changed the title After deleting the Text in a TextField, the TextField does not focus Text selection magnifier is freezing, causes the TextField to prevent inputing after closing the keyboard on the iPad Mar 29, 2024
@vashworth vashworth added the triaged-ios Triaged by iOS platform team label Apr 3, 2024
@flutter-triage-bot flutter-triage-bot bot removed fyi-ios For the attention of iOS platform team triaged-ios Triaged by iOS platform team labels Apr 3, 2024
@justinmc
Copy link
Contributor

justinmc commented Apr 4, 2024

Does anyone see an error in the console when this bug happens, or it just freezes silently?

@justinmc justinmc added triaged-text-input Triaged by Text Input team P2 Important issues not at the top of the work list labels Apr 4, 2024
@huycozy
Copy link
Member

huycozy commented Apr 5, 2024

Does anyone see an error in the console when this bug happens, or it just freezes silently?

@justinmc No error/warning appears in the output console. The issue starts happening when magnifier is freezing.

@hohoins
Copy link
Author

hohoins commented Apr 11, 2024

🙏 🙏 🙏 🙏 🙏

@hohoins
Copy link
Author

hohoins commented Apr 22, 2024

Are there any plans to fix this issue?
🙇🙇🙇🙇🙇

@wanjm
Copy link

wanjm commented Apr 25, 2024

#142294
#138395
#136244
I think all this may have the same root cause, after this operation, some native view is displayed which block the event from been send to flutter, so the GestureDetector is broken;

@cbracken @dkwingsmt @yaakovschectman @goderbauer I hope you can have a look at this;

@danagbemava-nc danagbemava-nc changed the title Text selection magnifier is freezing, causes the TextField to prevent inputing after closing the keyboard on the iPad Text selection magnifier freezes, causing the TextField to prevent input after closing the keyboard on the iPad Apr 26, 2024
@hohoins
Copy link
Author

hohoins commented May 9, 2024

I was checking to see if the issue would be automatically closed.
Let's hope it's being fixed.
I will pray.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: text input Entering text in a text field or keyboard related problems found in release: 3.19 Found to occur in 3.19 found in release: 3.21 Found to occur in 3.21 has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list platform-ios iOS applications specifically team-text-input Owned by Text Input team triaged-text-input Triaged by Text Input team
Projects
None yet
Development

No branches or pull requests

5 participants