You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enter key is not working properly (the cursor is not updated to the newline) in Text Fields #19371
The flutter is the latest version. I just ran flutter upgrade.
$ flutter doctor
[✓] Flutter (Channel master, v0.5.7-pre.118, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] Android Studio (version 2.3)
It's hard for me to describe the bug in English so that I uploaded three screenrecords. Both bug01.mp4 and bug02.mp4 are the bug behaviors. expect.mp4 is what I expect in a normal native app.
Basically, when I input words in text fields and press Enter, the cursor is always not updated to the next new line and the cursor is still in the old line. (this is not expected) That will cause some weird observation. When the cursor is still in the old line and I input some words, the new inputs will jump to next line. Something like that.
PS:
Actually, I found this incorrect Enter key behavior 7 months ago and filed a bug in some community app project. I didn't pay too much attention on this bug because I think it's too obvious and everyone should notice it. I thought the bug should be fixed very soon. But I was wrong and after about a year, the most obvious bug is still here.
changed the title [-]Enter key is not working properly (the cursor is always in the wrong position) in Text Fields[/-][+]Enter key is not working properly (the cursor is not updated to the newline) in Text Fields[/+]on Jul 14, 2018
@jonahwilliams Sorry, no. I don't have iOS mobiles at all. I can reproduce this on all different Android mobiles, such as Android 8.1, Android 7.1.1, Android 5.1.1 etc... And the screenrecords I posted are from android 8.1.
Thanks a lot for the investigation and reply. I hope this bug can be fixed soon since I plan to write a wiki app which will use text fields heavily.
I think this is a dup of #15572
and I can still reproduce with
[✓] Flutter (Channel master, v0.5.7-pre.122, on Mac OS X 10.13.5 17F77, locale en-AT)
• Flutter version 0.5.7-pre.122 at /Users/zoechi/flutter/flutter
• Framework revision e7832a3 (2 days ago), 2018-07-14 09:32:41 -0700
• Engine revision c5a63d2
• Dart version 2.0.0-dev.67.0.flutter-84ca27a09e
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /usr/local/opt/android-sdk
• Android NDK at /usr/local/opt/android-sdk/ndk-bundle
• Platform android-27, build-tools 27.0.3
• ANDROID_HOME = /usr/local/opt/android-sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.4.1, Build version 9F2000
• ios-deploy 1.9.2
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 23.1.2
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] IntelliJ IDEA Ultimate Edition (version 2018.1.5)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 26.0.2
• Dart plugin version 181.4892.1
[✓] Connected devices (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator)
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.
Activity
[-]Enter key is not working properly (the cursor is always in the wrong position) in Text Fields[/-][+]Enter key is not working properly (the cursor is not updated to the newline) in Text Fields[/+]jonahwilliams commentedon Jul 14, 2018
I can reproduce this on iOS but not on Android, might be specific to the iOS text handling
sgon00 commentedon Jul 15, 2018
@jonahwilliams Sorry, no. I don't have iOS mobiles at all. I can reproduce this on all different Android mobiles, such as Android 8.1, Android 7.1.1, Android 5.1.1 etc... And the screenrecords I posted are from android 8.1.
Thanks a lot for the investigation and reply. I hope this bug can be fixed soon since I plan to write a wiki app which will use text fields heavily.
jonahwilliams commentedon Jul 15, 2018
@sgon00 you're right, I can reproduce this on android devices as well.
jonahwilliams commentedon Jul 15, 2018
The issue appears to be that TextAffinity is not updated from upstream to downstream when a newline is inserted
zoechi commentedon Jul 16, 2018
I think this is a dup of #15572
and I can still reproduce with
[✓] Flutter (Channel master, v0.5.7-pre.122, on Mac OS X 10.13.5 17F77, locale en-AT)
• Flutter version 0.5.7-pre.122 at /Users/zoechi/flutter/flutter
• Framework revision e7832a3 (2 days ago), 2018-07-14 09:32:41 -0700
• Engine revision c5a63d2
• Dart version 2.0.0-dev.67.0.flutter-84ca27a09e
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /usr/local/opt/android-sdk
• Android NDK at /usr/local/opt/android-sdk/ndk-bundle
• Platform android-27, build-tools 27.0.3
• ANDROID_HOME = /usr/local/opt/android-sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.4.1, Build version 9F2000
• ios-deploy 1.9.2
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 23.1.2
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] IntelliJ IDEA Ultimate Edition (version 2018.1.5)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 26.0.2
• Dart plugin version 181.4892.1
[✓] Connected devices (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator)
• No issues found!
jonahwilliams commentedon Jul 16, 2018
Ahh thanks @zoechi , closing this as a dup of #15572
github-actions commentedon Sep 2, 2021
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.