Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TextField text replacement on iOS when autocorrect disabled #74753

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

Closed
mzykiert opened this issue Jan 26, 2021 · 6 comments
Closed

TextField text replacement on iOS when autocorrect disabled #74753

mzykiert opened this issue Jan 26, 2021 · 6 comments
Labels
a: fidelity Matching the OEM platforms better a: text input Entering text in a text field or keyboard related problems f: material design flutter/packages/flutter/material repository. found in release: 3.3 Found to occur in 3.3 found in release: 3.7 Found to occur in 3.7 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-design Owned by Design Languages team triaged-design Triaged by Design Languages team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds

Comments

@mzykiert
Copy link

Problem occure on ios when on device are defined Text Replacement (Settings->General-> Keyboard -> Text Replacement).
Despite disabled autocorrect for TextField text replacement still works.
We decide to disabled this feature because flutter have problem with tooltips (#12920) and user can't decide if he want to replace selected text. I belive autocorrect setting to false also should disable text replacement.

Steps to Reproduce

Code to reproduce problem:

void main() {
    runApp(MyApp());
}

class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return const MaterialApp(
        home: Scaffold(
          body: Center(
            child: Padding(
              padding: EdgeInsets.all(60),
              child: TextField(
                textAlign: TextAlign.end,
                decoration: InputDecoration(hintText: "hint"),
              ),
            )
          ),
        ),
      );
    }
}

Expected results:

Text shouldn't be replaced.

Actual results:

Text is replaced.

text_replacement_Trim.mp4
Logs

flutter doctor -v result:

[✓] Flutter (Channel stable, 1.22.6, on Mac OS X 10.15.7 19H2 darwin-x64, locale pl-PL)
     • Flutter version 1.22.6 at /Users/Shared/flutter
     • Framework revision 9b2d32b605 (4 days ago), 2021-01-22 14:36:39-0800
     • Engine revision 2f0af37152
     • Dart version 2.10.5

[✗] 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.dev/docs/get-started/install/macos#android-setup for detailed instructions).
       If the Android SDK has been installed to a custom location, set ANDROID_SDK_ROOT to that location.
       You may also want to add it to your PATH environment variable.



[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
     • Xcode at /Applications/Xcode.app/Contents/Developer
     • Xcode 12.3, Build version 12C33
     • CocoaPods version 1.9.3

[✓] Android Studio (version 3.5)
     • Android Studio at /Applications/Android Studio.app/Contents
     • Flutter plugin version 44.0.1
     • Dart plugin version 191.8593
     • Java version OpenJDK Runtime Environment (build
1.8.0_202-release-1483-b49-5587405)

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

[✓] Connected device (1 available)
     • iPhone (Mateusz) (mobile) • 00008030-001A21022E46802E • ios • iOS 14.3

@darshankawar
Copy link
Member

Issue replicable on latest master.

Screenshot 2021-01-27 at 2 06 30 PM

Screenshot 2021-01-27 at 2 06 55 PM

Screenshot 2021-01-27 at 2 07 12 PM

code sample
Center(
            child: Padding(
              padding: EdgeInsets.all(60),
              child: TextField(
                autocorrect: false,
                textAlign: TextAlign.end,
                decoration: InputDecoration(hintText: "hint"),
              ),
            )
        ),

flutter doctor -v
[✓] Flutter (Channel master, 1.26.0-13.0.pre.177, on Mac OS X 10.15.4 19E2269
    darwin-x64, locale en-IN)
    • Flutter version 1.26.0-13.0.pre.177 at
      /Users/dhs/documents/Fluttersdk/flutter
    • Framework revision 2eeeba9c09 (28 hours ago), 2021-01-25 20:52:30 -0800
    • Engine revision 6e391c5942
    • Dart version 2.12.0 (build 2.12.0-257.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • 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 at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    ! 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)

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

[✓] Connected device (4 available)
    • AOSP on IA Emulator (mobile) • emulator-5554                        •
      android-x86    • Android 9 (API 28) (emulator)
    • iPhone 12 Pro Max (mobile)   • A5473606-0213-4FD8-BA16-553433949729 • ios
      • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
    • macOS (desktop)              • macos                                •
      darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
    • Chrome (web)                 • chrome                               •
      web-javascript • Google Chrome 88.0.4324.96

! Doctor found issues in 1 category.

@darshankawar darshankawar added a: text input Entering text in a text field or keyboard related problems a: typography Text rendering, possibly libtxt found in release: 1.26 Found to occur in 1.26 has reproducible steps The issue has been confirmed reproducible and is ready to work on platform-ios iOS applications specifically a: fidelity Matching the OEM platforms better labels Jan 27, 2021
@HansMuller HansMuller added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Jan 27, 2021
@maheshj01
Copy link
Member

This issue is still replicable on stable 3.3 and master 3.7.

Screen.Recording.2022-12-08.at.2.00.21.PM.mov
flutter doctor -v (mac)
[✓] Flutter (Channel master, 3.7.0-3.0.pre.33, on macOS 12.6 21G115 darwin-arm64, locale en-IN)
    • Flutter version 3.7.0-3.0.pre.33 on channel master 
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5201856805 (38 minutes ago), 2022-12-05 18:27:21 -0800
    • Engine revision a309d239c4
    • Dart version 2.19.0 (build 2.19.0-463.0.dev)
    • DevTools version 2.20.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly
      to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0-rc4
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2021.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 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

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

[✓] Connected device (3 available)
    • iPhone 12 Pro (mobile) • 026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 12.6 21G115 darwin-arm64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 108.0.5359.94

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
[✓] Flutter (Channel stable, 3.3.9, on macOS 12.6 21G115 darwin-arm, locale en-IN)
    • Flutter version 3.3.9 on channel stable at /Users/mahesh/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b8f7f1f986 (24 hours ago), 2022-11-23 06:43:51 +0900
    • Engine revision 8f2221fbef
    • Dart version 2.18.5
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0-rc4
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2021.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 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

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

[✓] Connected device (3 available)
    • iPhone 12 Pro (mobile) • 026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 12.6 21G115 darwin-arm
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 107.0.5304.110

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

@maheshj01 maheshj01 added found in release: 3.3 Found to occur in 3.3 found in release: 3.7 Found to occur in 3.7 and removed found in release: 1.26 Found to occur in 1.26 labels Dec 8, 2022
@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team labels Jul 8, 2023
@stuartmorgan-g stuartmorgan-g added team-design Owned by Design Languages team triaged-design Triaged by Design Languages team and removed team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team labels Jul 17, 2023
@manas-raj-shrestha
Copy link

manas-raj-shrestha commented Aug 1, 2023

@mzykiert @maheshmnj Did you find any solution to this?

@chinmaygarde chinmaygarde removed the a: typography Text rendering, possibly libtxt label Sep 8, 2023
@vijinhps
Copy link

vijinhps commented Dec 6, 2023

any update on this? still facing in ios 17

@LongCatIsLooong
Copy link
Contributor

I belive autocorrect setting to false also should disable text replacement.

I do not think this is the case in UIKit apps. These are two different features and they just appear to be using the same UI.

@LongCatIsLooong LongCatIsLooong added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Apr 9, 2025
Copy link

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: fidelity Matching the OEM platforms better a: text input Entering text in a text field or keyboard related problems f: material design flutter/packages/flutter/material repository. found in release: 3.3 Found to occur in 3.3 found in release: 3.7 Found to occur in 3.7 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-design Owned by Design Languages team triaged-design Triaged by Design Languages team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds
Projects
None yet
Development

No branches or pull requests

10 participants