Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to disable autocorrection and leave the auto-suggest bar visible on iOS with TextField #159584

Closed
jan-swiezynski opened this issue Nov 28, 2024 · 2 comments · May be fixed by flutter/engine#56859
Labels
a: text input Entering text in a text field or keyboard related problems engine flutter/engine repository. See also e: labels. f: material design flutter/packages/flutter/material repository. found in release: 3.24 Found to occur in 3.24 found in release: 3.27 Found to occur in 3.27 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on platform-ios iOS applications specifically team-ios Owned by iOS platform team

Comments

@jan-swiezynski
Copy link

Steps to reproduce

  1. Add a TextField
  2. Disable autocorrect and enable suggestions on the TextField

Expected results

Auto-suggest bar visible but automatic word correction disabled

Actual results

After disabling autocorrect the auto-suggest is disabled as well

Code sample

Code sample
import 'package:flutter/material.dart';
void main() {
  runApp(MaterialApp(
    home: Material(
      child: Container(
        color: Colors.white,
        padding: EdgeInsets.all(30),
        child: Center(
          child: TextField(
            autocorrect: false,
            enableSuggestions: true,
        )),
      ),
    ),
  ));
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.24.5, on macOS 15.1.1 24B91 darwin-x64, locale
    pl-PL)
    • Flutter version 3.24.5 on channel stable at
      /Users/megajasio/Flutter/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision dec2ee5c1f (2 weeks ago), 2024-11-13 11:13:06 -0800
    • Engine revision a18df97ca5
    • Dart version 3.5.4
    • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/megajasio/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915915-b509.11)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16B40
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.3)
    • Android Studio at /Applications/Android Studio old.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
      17.0.10+0-17.0.10b1087.21-11572160)

[✓] Android Studio (version 2024.2)
    • 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 21.0.3+-79915915-b509.11)

[✓] VS Code (version 1.95.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.100.0

[✓] Connected device (4 available)
    • iPhone (mobile)    • 00008030-001930121AEA802E            • ios
      • iOS 17.6.1 21G93
    • iPhone 16 (mobile) • F2EA3B2B-0ED4-4268-825A-C88B44C9020A • ios
      • com.apple.CoreSimulator.SimRuntime.iOS-18-1 (simulator)
    • macOS (desktop)    • macos                                • darwin-x64
      • macOS 15.1.1 24B91 darwin-x64
    • Chrome (web)       • chrome                               • web-javascript
      • Google Chrome 131.0.6778.86

[✓] Network resources
    • All expected network resources are available.
@darshankawar darshankawar added the in triage Presently being triaged by the triage team label Nov 28, 2024
@darshankawar
Copy link
Member

Thanks for the report and potential fix. Seeing the same behavior as reported using latest versions.

Screenshot 2024-11-28 at 3 57 01 PM
stable : 3.24.5
master : 3.27.0-1.0.pre.628

Maybe related to #134881 ?

@darshankawar darshankawar added a: text input Entering text in a text field or keyboard related problems platform-ios iOS applications specifically framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. has reproducible steps The issue has been confirmed reproducible and is ready to work on found in release: 3.24 Found to occur in 3.24 found in release: 3.27 Found to occur in 3.27 engine flutter/engine repository. See also e: labels. team-ios Owned by iOS platform team and removed in triage Presently being triaged by the triage team labels Nov 28, 2024
@jmagman
Copy link
Member

jmagman commented Dec 20, 2024

This is unexpected, but it's actually behaving as documented:

#42550

https://api.flutter.dev/flutter/material/TextField/enableSuggestions.html says:

This flag only affects Android. On iOS, suggestions are tied directly to autocorrect, so that suggestions are only shown when autocorrect is true. On Android autocorrection and suggestion are controlled separately.

@jmagman jmagman closed this as completed Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: text input Entering text in a text field or keyboard related problems engine flutter/engine repository. See also e: labels. f: material design flutter/packages/flutter/material repository. found in release: 3.24 Found to occur in 3.24 found in release: 3.27 Found to occur in 3.27 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on platform-ios iOS applications specifically team-ios Owned by iOS platform team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants