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

TextFormField is not focused when tapping it again after entering Japanese characters without pressing done but closing keyboard #138395

Closed
2 tasks done
shm40 opened this issue Nov 14, 2023 · 23 comments
Labels
a: internationalization Supporting other languages or locales. (aka i18n) a: text input Entering text in a text field or keyboard related problems e: device-specific Only manifests on certain devices f: material design flutter/packages/flutter/material repository. P2 Important issues not at the top of the work list platform-ios iOS applications specifically r: fixed Issue is closed as already fixed in a newer version team-design Owned by Design Languages team triaged-design Triaged by Design Languages team

Comments

@shm40
Copy link

shm40 commented Nov 14, 2023

Is there an existing issue for this?

Steps to reproduce

  1. Add a Japanese Keyboard to your iPad
  2. Run the below code sample
  3. Enter あいう (these are Japanese characters) on TextFormField A
  4. Tap the right bottom button on the keyboard
  5. Tap TextFormField A again
  6. Enter あいう (but nothing reflects on TextFormField A)

I am testing this on iPad Air third generation on iPad OS 16.6.1.

Expected results

Without even tapping the done button on the keyboard, any Japanese characters can be reflected after opening the keyboard again.

Actual results

Any Japanese characters cannot be reflected on TextFormFiled after hiding the keyboard from the right bottom button.

Code sample

Code sample
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  const HomePage({super.key});

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: ListView(
        padding: const EdgeInsets.all(16),
        children: [
          TextFormField(
            decoration: const InputDecoration(labelText: 'TextFormField A'),
          ),
          TextFormField(
            decoration: const InputDecoration(labelText: 'TextFormField B'),
          ),
        ],
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
5c076d8f-d061-4d13-95f2-5dd89d2e6aa7.mp4

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.13.9, on macOS 13.4.1 22F770820d darwin-x64, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] VS Code (version 1.84.2)
[✓] Connected device (3 available)
[✓] Network resources
@dam-ease dam-ease added the in triage Presently being triaged by the triage team label Nov 14, 2023
@dam-ease
Copy link

Hi @shm40. Thanks for filing this.
I'm trying to reproduce this on an iPad Air (5th generation), iOS 16.4 but can't seem to reproduce this. Can you try on other simulator versions to see if this reproduces there as well or if this could be device-specific?

Simulator.Screen.Recording.-.iPad.Air.5th.generation.-.2023-11-14.at.13.52.58.mp4

@dam-ease dam-ease added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Nov 14, 2023
@shm40
Copy link
Author

shm40 commented Nov 14, 2023

@dam-ease
Thanks for trying this issue if it can reproduce.
When I tried this case on the Simulator, there was no problem. But when I use the physical device, it happens.
Could you please try not on the Simulator but the physical device if you have any?

@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 Nov 14, 2023
@dam-ease
Copy link

Thanks for your response. I don't have a physical device with this specification to test this on my end but I tested on a physical iPhone 13 device and couldn't reproduce this.
Per the video attached in the original comment, I'll be labelling this for more insights from the team.
Thank you!

stable, master flutter doctor -v

[!] Flutter (Channel stable, 3.13.9, on macOS 14.0 23A344 darwin-arm64, locale
    en-NG)
    • Flutter version 3.13.9 on channel stable at
      /Users/damilolaalimi/sdks/flutter
    ! Warning: `dart` on your path resolves to
      /opt/homebrew/Cellar/dart/3.1.5/libexec/bin/dart, which is not inside your
      current Flutter SDK checkout at /Users/damilolaalimi/sdks/flutter.
      Consider adding /Users/damilolaalimi/sdks/flutter/bin to the front of your
      path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d211f42860 (3 weeks ago), 2023-10-25 13:42:25 -0700
    • Engine revision 0545f8705d
    • Dart version 3.1.5
    • DevTools version 2.25.0
    • 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/damilolaalimi/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/damilolaalimi/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

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

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

[✓] Android Studio (version 2022.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.6+0-17.0.6b802.4-9586694)

[!] Android Studio (version unknown)
    • Android Studio at /Users/damilolaalimi/Downloads/Android Studio
      Preview.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
    ✗ Unable to determine Android Studio version.
    • Java version OpenJDK Runtime Environment (build
      17.0.7+0-17.0.7b1000.6-10550314)

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

[✓] VS Code (version 1.83.1)
    • VS Code at /Users/damilolaalimi/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.50.0

[✓] Connected device (5 available)
    • sdk gphone64 arm64 (mobile)        • emulator-5554
      • android-arm64  • Android 14 (API 34) (emulator)
    • Damilola’s iPhone (mobile)         • 00008110-001964480AE1801E
      • ios            • iOS 17.0.2 21A351
    • iPad Air (5th generation) (mobile) • B3716F7D-587E-4473-9F87-F1BA94E31B29
      • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)                    • macos
      • darwin-arm64   • macOS 14.0 23A344 darwin-arm64
    • Chrome (web)                       • chrome
      • web-javascript • Google Chrome 119.0.6045.123

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

! Doctor found issues in 2 categories.
[!] Flutter (Channel master, 3.17.0-9.0.pre.22, on macOS 14.0 23A344 darwin-arm64, locale en-NG)
    • Flutter version 3.17.0-9.0.pre.22 on channel master at /Users/damilolaalimi/fvm/versions/master
    ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/3.1.5/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/damilolaalimi/fvm/versions/master. Consider adding /Users/damilolaalimi/fvm/versions/master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a930fd8e4a (50 minutes ago), 2023-11-15 00:03:08 -0500
    • Engine revision a7f2267dd1
    • Dart version 3.3.0 (build 3.3.0-133.0.dev)
    • DevTools version 2.30.0-dev.4
    • 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/damilolaalimi/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/damilolaalimi/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

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

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

[✓] Android Studio (version 2022.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.6+0-17.0.6b802.4-9586694)

[!] Android Studio (version unknown)
    • Android Studio at /Users/damilolaalimi/Downloads/Android Studio Preview.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
    ✗ Unable to determine Android Studio version.
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

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

[✓] VS Code (version 1.83.1)
    • VS Code at /Users/damilolaalimi/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.50.0

[✓] Connected device (5 available)
    • sdk gphone64 arm64 (mobile)        • emulator-5554                        • android-arm64  • Android 14 (API 34) (emulator)
    • Damilola’s iPhone (mobile)         • 00008110-001964480AE1801E            • ios            • iOS 17.0.2 21A351
    • iPad Air (5th generation) (mobile) • B3716F7D-587E-4473-9F87-F1BA94E31B29 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)                    • macos                                • darwin-arm64   • macOS 14.0 23A344 darwin-arm64
    • Chrome (web)                       • chrome                               • web-javascript • Google Chrome 119.0.6045.123

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

! Doctor found issues in 2 categories.

@dam-ease dam-ease added a: text input Entering text in a text field or keyboard related problems e: device-specific Only manifests on certain devices platform-ios iOS applications specifically a: internationalization Supporting other languages or locales. (aka i18n) team-ios Owned by iOS platform team and removed in triage Presently being triaged by the triage team labels Nov 15, 2023
@shm40
Copy link
Author

shm40 commented Nov 15, 2023

Thanks for testing on the physical device but iPhone.
I also tested on my iPhone X but it seems that the issue happens only on the physical iPad device.

I really hope that anyone who has a physical iPad device could test this case.
Thanks.

@LongCatIsLooong
Copy link
Contributor

/cc @LongCatIsLooong to repro on a physical iPad.

@LongCatIsLooong LongCatIsLooong added P2 Important issues not at the top of the work list team-design Owned by Design Languages team triaged-design Triaged by Design Languages team and removed team-ios Owned by iOS platform team labels Nov 16, 2023
@dam-ease dam-ease added the f: material design flutter/packages/flutter/material repository. label Nov 17, 2023
@zhouzhuo810
Copy link

Thanks for testing on the physical device but iPhone. I also tested on my iPhone X but it seems that the issue happens only on the physical iPad device.

I really hope that anyone who has a physical iPad device could test this case. Thanks.

I also encountered this issue, my device is an iPad (9th generation) #141546

@wanjm
Copy link

wanjm commented Feb 3, 2024

I have encoutered this too in #142294 and #142437;
and operate sequence is exactly the same; when reproduce you should use the bottom-right key instead of the done/enter key;
it can be reproduced with iPad of 15.X and 16.X using flutter 3.13 and above ; flutter 3.10 had no such problem;
iPad 17 had no such problem;

@wanjm
Copy link

wanjm commented Feb 3, 2024

@huycozy @dam-ease @danagbemava-nc I hope you can find a physical device to help reproduce it; and hope we can make some progress;

Please!

@shm40
Copy link
Author

shm40 commented Mar 4, 2024

I tested this issue on Flutter 3.19.2 but could not reproduce so it might be fixed through Flutter upgrade.

@wanjm I hope you can test the same issue where it could be reproduced and report the result.

@hohoins
Copy link

hohoins commented Mar 8, 2024

The same problem can be reproduced in flutter 3.19.2. Please check and respond.
#144768

In my environment, it can be reproduced starting from flutter 3.13.0. Note please.
————————————
3.3.10 X
3.7.12 X
3.10.7 X
————————————
3.13.0 O It is reproduced.
3.13.9 O It is reproduced.
3.19.2 O It is reproduced.
————————————

@hohoins
Copy link

hohoins commented Mar 13, 2024

@shm40 @dam-ease
This problem is currently being reproduced in flutte 3.19.2.
It can be reproduced on the actual iPad device.
The keyboard can be reproduced by setting it to Japanese (romaji).

If this problem occurs once, the app will malfunction from then on until you run the app again.
As an example, even after moving to another screen, the keyboard is displayed when you touch the screen.

The problem is serious. Once this happens, it becomes difficult to use the App anymore.
It definitely needs correction.
I hope this will be fixed in the next version of Flutter.

Please respond to the issue.

@sanghyuk-nam
Copy link

I was able to reproduce it by pressing the hide button at the bottom right of the iPad software keyboard.
image-1

@hohoins
Copy link

hohoins commented Mar 14, 2024

I was able to reproduce it by pressing the hide button at the bottom right of the iPad software keyboard. image-1

you're right. Same in my case.
This was reproduced when I pressed the keyboard down button located at the bottom right of the keyboard.

@wanjm
Copy link

wanjm commented Mar 16, 2024

@hohoins @sanghyuk-nam @shm40 please thumbs the first post, and try to make it be noticeable;

@hohoins
Copy link

hohoins commented Mar 21, 2024

@wanjm @shm40 @zhouzhuo810 @LongCatIsLooong @dam-ease @danagbemava-nc

flutter 3.19.3

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

The flutter TextField bug on iOS devices is a serious and critical problem.
The flutter app I developed has many users in Japan.
This Japanese keyboard bug is fatal to Japanese users.
Once the problem occurs, the problem persists even on screens without a TextField until the app is restarted.

To inform flutter developers of the seriousness of the problem, I have attached a demo app and a reproduction video.
Please find the cause and fix it.

Just using the TextField widget can cause fatal problems in users' apps.
I hope this will be fixed in the next flutter version.

If you know the email address of someone who can fix this problem, please contact me.
thank you

1000025984.mp4

@shm40
Copy link
Author

shm40 commented Mar 22, 2024

@hohoins
Thanks for your reports.
I tested this issue with your sample code on iPad Airt 3rd gen with iPad OS 17.3.1 but could not reproduce it.

It seems that your iPad OS Version is older than me.
Could you please test the issue again after upgrading the iPad OS version?

b8a3584d-74ec-4753-9932-f4f87867f09e.mp4

@hohoins
Copy link

hohoins commented Mar 22, 2024

@hohoins Thanks for your reports. I tested this issue with your sample code on iPad Airt 3rd gen with iPad OS 17.3.1 but could not reproduce it.

It seems that your iPad OS Version is older than me. Could you please test the issue again after upgrading the iPad OS version?

b8a3584d-74ec-4753-9932-f4f87867f09e.mp4

Thank you for your interest in this bug.
I will try to reproduce it again by updating iPad OS.
I will contact you.
thank you
👍👍👍👍👍👍👍

@hohoins
Copy link

hohoins commented Mar 22, 2024

@shm40

I upgraded to iOS 17.4.1 on my iPad.
After the upgrade, it seems that it cannot be reproduced by simply opening and closing the keyboard.
👍👍👍👍👍

But if I change the way I reproduce it, it's still possible.
If you need to register a new issue, please contact me.
A reproduction video is attached.

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

Reproducible keyboard:

  • japanese romaji
  • english (us)
  • korean
    It appears to be reproduced regardless of keyboard language.
re.mov

@LongCatIsLooong
Copy link
Contributor

I tried this on a device with an older version of iPadOS (13.3), and iOS17.2 simulator. The bug is not reproducible on either of them. It looks like this isn't reproducible on iOS 17+ devices so I'll close this one as not reproducible anymore.

@hohoins I'm not able to reproduce the other bug either, could you create a new issue for this?

@hohoins
Copy link

hohoins commented Mar 26, 2024

@LongCatIsLooong @shm40
The issue has been closed.
But it didn't solve the TextField issue.
This issue is still reproducible in the latest version.
It even has nothing to do with keyboard language settings.
I plan to register this phenomenon as a separate issue.
thank you

@danagbemava-nc danagbemava-nc added the r: fixed Issue is closed as already fixed in a newer version label Mar 26, 2024
@wanjm
Copy link

wanjm commented Apr 5, 2024

@hohoins where is your new issue;

@hohoins
Copy link

hohoins commented Apr 6, 2024

wanjm

Thank you for contacting me.
The newly created issue is here.
#145751

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: internationalization Supporting other languages or locales. (aka i18n) a: text input Entering text in a text field or keyboard related problems e: device-specific Only manifests on certain devices f: material design flutter/packages/flutter/material repository. P2 Important issues not at the top of the work list platform-ios iOS applications specifically r: fixed Issue is closed as already fixed in a newer version team-design Owned by Design Languages team triaged-design Triaged by Design Languages team
Projects
None yet
Development

No branches or pull requests

8 participants