Repository navigation
TextInput spell check doesn't work great on iOS #124882
Copy link
Copy link
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specificallyiOS applications specifically
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
Use the following widget on any Flutter iOS app (on >3.10)
TextField(spellCheckConfiguration: SpellCheckConfiguration()),)
Type in "hel", press space, and then click on the text once there is a red line underneath
Expected results
I would expect that TextField either:
- Uses the default iOS-style of spellcheck suggestions by default (as shown above)
- Or has some way to customize the spellcheck suggestions so a developer can manually make them look correct on iOS
Actual results
Responses are overflowing and the iOS context menu is not used.
Overall this isn't a great experience for our developers. As Tao mentioned, the different APIs for TextField and CupertinoTextField make it difficult to adapt between the two in a single app. However, developers have frequently noted that text input should "feel native" on platforms, and we know most of our developers are deploying to both Android and iOS.
Code sample
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
useMaterial3: true,
),
home: Scaffold(
body: Center(
child: TextField(
spellCheckConfiguration: SpellCheckConfiguration(),
)),
),
);
}
}
Screenshots or Video
No response
Logs
No response
Flutter Doctor output
Doctor output
[✓] Flutter (Channel master, 3.10.0-6.0.pre.9, on macOS 13.3.1 22E261 darwin-arm64, locale en)
• Flutter version 3.10.0-6.0.pre.9 on channel master at /Users/leighaj/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 119744a63c (2 hours ago), 2023-04-14 10:43:17 -0700
• Engine revision ea0e1b1700
• Dart version 3.1.0 (build 3.1.0-4.0.dev)
• DevTools version 2.23.1
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
• Android SDK at /Users/leighaj/Library/Android/sdk
• Platform android-33, build-tools 33.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.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 11.0.15+0-b2043.56-8887301)
[✓] VS Code (version 1.77.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.62.0
[✓] Connected device (3 available)
• iPhone 14 (mobile) • 2737695B-AB22-46E3-A8B2-F6AA3514A477 • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-2
(simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.3.1 22E261 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 112.0.5615.49
[✓] Network resources
• All expected network resources are available.
• No issues found!```
</details>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specificallyiOS applications specifically


Activity
justinmc commentedon Apr 24, 2023
I've merged three PRs related to this and am waiting on one last one (all linked above). When merged this will be the behavior and I'll close this issue if no one objects:
Screen.Recording.2023-04-24.at.11.44.23.AM.mov
leighajarett commentedon Apr 24, 2023
@justinmc LGTM - so just to confirm, this uses the same Cupertino-style word suggestions (like if there are multiple suggestions, it will show the top 3 separated by vertical dividers) ?
justinmc commentedon Apr 24, 2023
That's right, here are some screenshots for the other cases:
github-actions commentedon May 9, 2023
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.