Repository navigation
Copy and paste text of dialog with TextField for Japanese is not centered vertically in iOS #73681
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 problemsc: regressionIt was better in the past than it is nowIt was better in the past than it is nowfound in release: 1.26Found to occur in 1.26Found to occur in 1.26frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesplatform-iosiOS applications specificallyiOS applications specifically
Description
Steps to Reproduce
- Use iOS
- Use TextField for Japanese (using
flutter_localizationspackage) - Display copy and paste dialog
main.dart
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: const [
Locale('ja', ''),
],
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('TextField demo'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
TextField(),
],
),
),
);
}
}pubspec.yaml
name: demo
description: A new Flutter application.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.0
flutter_localizations:
sdk: flutter
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: trueflutter doctor -v
[✓] Flutter (Channel stable, 1.22.5, on macOS 11.1 20C69 darwin-x64, locale ja-JP)
• Flutter version 1.22.5 at /Users/donchan922/flutter
• Framework revision 7891006299 (4 weeks ago), 2020-12-10 11:54:40 -0800
• Engine revision ae90085a84
• Dart version 2.10.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/donchan922/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.2, Build version 12B45b
• CocoaPods version 1.10.0
[!] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.52.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.18.1
[✓] Connected device (1 available)
• iPhone SE (2nd generation) (mobile) • 345BC08D-0CD9-49CC-ABF0-8EA61B9FD588 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-5
(simulator)
! Doctor found issues in 1 category.
Expected results:
Copy and paste text of dialog with TextField for Japanese should be centered vertically in iOS.
Actual results:
Copy and paste text of dialog with TextField for Japanese is not centered vertically (a little below the center).
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 problemsc: regressionIt was better in the past than it is nowIt was better in the past than it is nowfound in release: 1.26Found to occur in 1.26Found to occur in 1.26frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagesplatform-iosiOS applications specificallyiOS applications specifically


Activity
[-]Copy and paste text dialog in TextField for Japanese is not centered vertically[/-][+]Copy and paste dialog in TextField for Japanese is not centered vertically in iOS[/+][-]Copy and paste dialog in TextField for Japanese is not centered vertically in iOS[/-][+]Copy and paste text of dialog with TextField for Japanese is not centered vertically in iOS[/+]YeungKC commentedon Jan 11, 2021
I remember that you have dealt with similar issues. @justinmc
kaboc commentedon Jan 11, 2021
It looks similar to #58512. They may be related in some way.
justinmc commentedon Jan 11, 2021
I think this may be a regression in CupertinoButton (which is used inside the text selection menu). @HansMuller Is this a regression or is it intended?
If I create two CupertinoButtons side-by-side, one with Japanese text and one with English, I see that they have different heights:
However, if I try this with TextButtons, there is no height difference:
Also, when trying the CupertinoButtons on DartPad, which is using an older version of Flutter, they have the same height:
HansMuller commentedon Jan 11, 2021
This was not an intentional change per the updates to the buttons and their themes.
pedromassangocode commentedon Jan 12, 2021
flutter doctor -v
[✓] Flutter (Channel master, 1.26.0-2.0.pre.295, on Mac OS X 10.15.7 19H2 darwin-x64, locale en) • Flutter version 1.26.0-2.0.pre.295 at /Users/pedromassango/Code/flutter_master • Framework revision c19fdad097 (10 hours ago), 2021-01-11 22:19:02 -0500 • Engine revision 0ed964d6b7 • Dart version 2.12.0 (build 2.12.0-212.0.dev) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /Users/pedromassango/Library/Android/sdk • Platform android-30, build-tools 30.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495) • All Android licenses accepted. [!] Xcode - develop for iOS and macOS (Xcode 12.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.1, Build version 12A7403 ! CocoaPods 1.9.3 out of date (1.10.0 is recommended). CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side. Without CocoaPods, plugins will not work on iOS or macOS. For more info, see https://flutter.dev/platform-plugins To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions. [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.1) • 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 1.8.0_242-release-1644-b3-6915495) [✓] IntelliJ IDEA Community Edition (version 2020.3.1) • IntelliJ at /Applications/IntelliJ IDEA CE.app • Flutter plugin version 52.1.5 • Dart plugin version 203.6912 [✓] VS Code (version 1.52.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.18.1 [✓] Connected device (3 available) • iPhone 12 Pro Max (mobile) • ECCF5C4A-8BEC-411D-B23E-85A836C3847E • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-1 (simulator) • macOS (desktop) • macos • darwin-x64 • Mac OS X 10.15.7 19H2 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 87.0.4280.141 ! Doctor found issues in 1 category.justinmc commentedon Jan 26, 2021
Closing as a duplicate of #69847. Let's move the discussion over there.
github-actions commentedon Aug 6, 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.