Repository navigation
Autocorrect tooltips don't appear on iOS #12920
Copy link
Copy link
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: fidelityMatching the OEM platforms betterMatching the OEM platforms bettera: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilitycustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.p: cupertino_uicupertino_ui package in flutter/packagescupertino_ui package in flutter/packagesp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Description
Steps to Reproduce
When using a native iOS app without text prediction enabled, there is a pop-up that indicates when autocorrections are going to occur, and when backspacing on a correction a pop-up appears that gives alternative choices for the word.
In flutter, the autocorrections happen silently and require backspacing into the word to make the correction. See the gif below for a comparison of the behavior.
Flutter should either integrate with the iOS autocorrection system to provide the popups or emulate them. This is a pretty big usability concern which makes it more difficult to enter text because the corrections are harder to notice and harder to fix.
Logs
N/A, this is a design issue.
Flutter Doctor
$ flutter doctor
Building flutter tool...
[✓] Flutter (on Mac OS X 10.12.6 16G29, locale en-US, channel master)
• Flutter at /Users/jwm/Projects/flutter
• Framework revision 337150308c (2 days ago), 2017-11-05 19:39:49 -0800
• Engine revision e059cc0258
• Tools Dart version 1.25.0-dev.11.0
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.0.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.0.1, Build version 9A1004
• ios-deploy 1.9.2
• CocoaPods version 1.3.1
[✗] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
[✓] IntelliJ IDEA Community Edition (version 2017.2.5)
• Flutter plugin version 18.2
• Dart plugin version 172.4343.25
[✓] Connected devices
• iPhone 7 Plus • DF665BBF-F7D6-4B75-8FCA-E092AD4AD6DC • ios • iOS 11.0 (simulator)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: fidelityMatching the OEM platforms betterMatching the OEM platforms bettera: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilitycustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.p: cupertino_uicupertino_ui package in flutter/packagescupertino_ui package in flutter/packagesp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Type
Projects
- StatusShow more project fieldsTodo

Activity
eseidelGoogle commentedon Nov 8, 2017
MD doesn't seem to talk about this, so this is likely going to be cupertino specific.
https://material.io/guidelines/components/text-fields.html
Thoughts @cbracken @xster?
lukepighetti commentedon Oct 10, 2018
@eseidelGoogle iOS doesn't have autocorrect on the keyboard "modal" like Android does, so this is not MD vs Cupertino, but more like we just need it in all apps on iOS otherwise text input is very difficult.
xster commentedon Oct 10, 2018
Thanks for the feedback. We're addressing a few non-cupertino iOS text entry issues at the moment like #9507, #20693 and #9288. Hopefully we'll have the bandwidth to address this one too after.
lukepighetti commentedon Oct 11, 2018
You know what's kind of embarrassing? I was using an iPhone 5c today and autocorrect was coming up on the keyboard. Literally never seen or noticed it before. So my apologies for my incorrect statement earlier. I'm not sure when that changed or when it displays. This was on iOS 10 btw.
100 remaining items
alxmoroz commentedon Feb 16, 2023
knopp commentedon May 11, 2023
@LongCatIsLooong, there is already a precedent for blocking call from engine to UI thread in
FlutterKeyboardManager.mm. It runs nested CFRunLoop inkMessageLoopCFRunLoopModeuntil it gets the response.Looking at the code I am wondering a bit what happens if the UI isolate gets terminated when within the inner loop. This is a bit underdocumented and I'm not 100% sure it is handled correctly.
Arguably this is playing with fire a little bit, but in this case it should be perfectly safe since the UI thread action is completely synchronous and UI thread can not do blocking calls to other threads.
We do similar thing in
super_drag_and_dropto get items forUIDragInteractionDelegateandUIContextMenuInteractionDelegate(though using FFI instead platform channel in order to make sure not to deadlock when isolate is terminated before platform code receives the response). But in our case it gets bit more complicated because the call also involves getting image data and thus waits for raster thread, which under some circumstances is blocked on platform thread. Still, it works quite well even though because of raster thread involvement we need to pump the event loop in default mode as well.But the situation here is simpler and the call to
TextInputPlugincan be synchronous, so the approach fromFlutterKeyboardManager.mmshould work just fine.lukemmtt commentedon Jun 21, 2023
This issue as a whole seems to have regressed with the changes introduced in iOS 17 Beta. Namely, the autocorrect “highlight rectangle” is now always highlighting the most recently entered character, regardless of whether there is an autocorrect pending or not.
RPReplay_Final1687351138.mov