Skip to content

Autocorrect tooltips don't appear on iOS #12920

Description

@jwmcglynn

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.

text_correction

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)

Activity

  1. eseidelGoogle commented on Nov 8, 2017

    @eseidelGoogle
    Contributor

    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?

  2. added
    a: text inputEntering text in a text field or keyboard related problems
    platform-iosiOS applications specifically
    on Nov 8, 2017
  3. lukepighetti commented on Oct 10, 2018

    @lukepighetti
    Contributor

    @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.

  4. xster commented on Oct 10, 2018

    @xster
    Member

    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.

  5. lukepighetti commented on Oct 11, 2018

    @lukepighetti
    Contributor

    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.

  6. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: cupertino_uicupertino_ui package in flutter/packages
    a: fidelityMatching the OEM platforms better
    on Nov 26, 2018
  7. added this to the milestone on Nov 26, 2018
  8. modified the milestones: , February 2019 on Nov 28, 2018
  9. 100 remaining items

  10. alxmoroz commented on Feb 16, 2023

    @alxmoroz
  11. knopp commented on May 11, 2023

    @knopp
    Member

    @LongCatIsLooong, there is already a precedent for blocking call from engine to UI thread in FlutterKeyboardManager.mm. It runs nested CFRunLoop in kMessageLoopCFRunLoopMode until 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_drop to get items for UIDragInteractionDelegate and UIContextMenuInteractionDelegate (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 TextInputPlugin can be synchronous, so the approach from FlutterKeyboardManager.mm should work just fine.

  12. lukemmtt commented on Jun 21, 2023

    @lukemmtt
    Contributor

    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
  13. added
    packageflutter/packages repository. See also p: labels.
    and removed
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: fidelityMatching the OEM platforms bettera: text inputEntering text in a text field or keyboard related problemsc: new featureNothing broken; request for a new capabilitycustomer: crowdAffects or could affect many people, though not necessarily a specific customer.p: cupertino_uicupertino_ui package in flutter/packagesp: material_uimaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions