Repository navigation
TextField, Enter Chinese in android device ,The bottom is cut #20183
Copy link
Copy link
Closed
Labels
a: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsa: typographyText rendering, possibly libtxtText rendering, possibly libtxtframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.waiting for PR to land (fixed)A fix is in flightA fix is in flight
Description
Steps to Reproduce
TextField 在Android设备上输入中文,文字底部没有显示完全,iOS则没有这个问题
TextField enters Chinese on Android devices, the bottom of the text is not displayed completely, iOS does not have this problem
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(
appBar: new AppBar(
title: new Text('Flutter Demo Home Page'),
),
body: new Container(
child: TextField(),
),
),
);
}
}Logs
Analyzing flutter_app...
No issues found! (ran in 1.2s)
[✓] Flutter (Channel master, v0.5.8-pre.229, on Mac OS X 10.13.6 17G65, locale zh-Hans-CN)
• Flutter version 0.5.8-pre.229 at /usr/local/flutter
• Framework revision cacd291c5c (2 hours ago), 2018-08-03 15:13:28 +0200
• Engine revision 4893b0760d
• Dart version 2.0.0-dev.69.5.flutter-8bad5c7b29
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.1)
• Android SDK at /data/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.1
• ANDROID_HOME = /data/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 26.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] VS Code (version 1.25.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.16.0
[✓] Connected devices (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
• No issues found!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsa: typographyText rendering, possibly libtxtText rendering, possibly libtxtframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.waiting for PR to land (fixed)A fix is in flightA fix is in flight

Activity
parcool commentedon Aug 3, 2018
I got the same issue. +1
TeddyRomanos commentedon Aug 4, 2018
I got the same issue. +1
TeddyRomanos commentedon Aug 5, 2018
This happens for Arabic as well.
leftwing666 commentedon Aug 21, 2018
it happens on v8.1
HansMuller commentedon Oct 24, 2018
@jason-simmons - are we getting the baseline wrong in this case?
HansMuller commentedon Oct 24, 2018
@llearn, @parcool @TeddyRomanos, @leftwing666 - When this failure occurs, what is the device's locale?
llearn commentedon Oct 25, 2018
@HansMuller mine is zh-CN
parcool commentedon Oct 25, 2018
Locale.CHINA SIMPLIFIED_CHINESE zh-CN
GaryQian commentedon Nov 9, 2018
@llearn I have attempted to reproduce this with the test app you provided on both an emulated and physical Nexus 5X, with locale set to zh_CN and have been unable to reproduce. I have also attempted on a Pixel, Pixel 2 XL, Nexus S, and Nexus 5 all without being able to reproduce. I then tried rolling back to an older version of Flutter dated at Aug 1st, which also failed to reproduce.
Did you or anyone else have a specific environment/device-API-Flutter combination that reliably reproduces this clipping?
1 remaining item
GaryQian commentedon Nov 12, 2018
I have been able to reproduce. Type Chinese characters on android, and then type multiple flag emojis. Erase the flag emojis, and the box will sometimes clip the characters. This is on a physical android device.
Update: This repro was not consistent outside of my test env, but I have still managed to come up with something that should fix this for now. Referenced below.
GaryQian commentedon Nov 19, 2018
Should be fixed by #24265. Waiting for it to land.
zoechi commentedon Jan 24, 2019
@llearn are you still seeing this?
llearn commentedon Jan 25, 2019
@GaryQian @zoechi This problem has been solved. Thank you.
GaryQian commentedon Jan 25, 2019
I believe this specific behavior was actually fixed by a patch by @jslavitz
I am still working on additional fixes to prevent the additional jank we are seeing with multilingual textfields. Strut (#26085) will help resolve this.
llearn commentedon Jan 25, 2019
不好意思,这里可能还有一点小问题,中文输入的时候光标位置不对(有点偏上)。
Sorry, there may be a small problem here. When the Chinese input is wrong, the cursor position is wrong (a bit biased).
github-actions commentedon Aug 15, 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.