[iOS Simulator] TextField adds spaces between characters when dragging cursor · Issue #167720 · flutter/flutter · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Drag the cursor across the text or use the arrow keys.
I can't reproduce this in a fresh flutter create project even though I am using the same code sample.
This is also only reproducible on iOS Simulator. This leads me to believe that this is not a framework issue but rather a Simulator or engine one and there are additional conditions to trigger this. I would appreciate any suggestions to try to track down the source of the issue so that I can provide a reproducible code sample.
I have used a fresh simulator (you can even see the first time tip when I open the keyboard).
Expected results
No spaces are added between characters.
Actual results
One space is added between the letters, but not symbols when changing the cursor position.
See the screen recording.
Code sample
I am unable to reproduce this on a fresh project, but this code reproduces the issue in my project.
Screenshots / Video demonstrationScreen.Recording.2025-04-24.mp4
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.29.3, on macOS 15.4 24E248 darwin-arm64, locale en-GB) [1,532ms] • Flutter version 3.29.3 on channel stable at /Users/alex/workspace/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision ea121f8859 (13 days ago), 2025-04-11 19:10:07 +0000 • Engine revision cf56914b32 • Dart version 3.7.2 • DevTools version 2.42.3[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [2.3s] • Android SDK at /Users/alex/Library/Android/sdk • Platform android-35, build-tools 34.0.0 • ANDROID_HOME = /Users/alex/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java This is the JDK bundled with the latest Android Studio installation on this machine. To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`. • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11) • All Android licenses accepted.[!] Xcode - develop for iOS and macOS (Xcode 16.3) [1,272ms] • Xcode at /Applications/Xcode.app/Contents/Developer • Build 16E140 ! CocoaPods 1.13.0 out of date (1.16.2 is recommended). CocoaPods is a package manager for iOS or macOS platform code. Without CocoaPods, plugins will not work on iOS or macOS. For more info, see https://flutter.dev/to/platform-plugins To update CocoaPods, see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) [12ms] ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.[✓] Android Studio (version 2024.2) [12ms] • 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+-79915917-b509.11)[✓] VS Code (version 1.99.3) [10ms] • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.108.0[✓] Connected device (3 available) [7.0s] • iPhone 15 Pro (mobile) • 2348BBCF-963B-412E-9D7E-258EA7E42E24 • ios • com.apple.CoreSimulator.SimRuntime.iOS-18-4 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 15.4 24E248 darwin-arm64 • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 15.4 24E248 darwin-arm64 ! Error: Browsing on the local area network for Alex’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27)[✓] Network resources [317ms] • All expected network resources are available.! Doctor found issues in 2 categories.
The text was updated successfully, but these errors were encountered:
RepliedSage11
changed the title
TextField adds spaces between characters when dragging cursor
[iOS Simulator] TextField adds spaces between characters when dragging cursor
Apr 24, 2025
Hi @RepliedSage11, I can't seem to reproduce the issue with the sample provided above. See the recording below. Did you start experiencing this recently? If so, do you remember what changed about your environment?
I am not sure if this was a recent or a long standing bug, because it only reproduces on the simulator and I just haven't tried moving the cursor before that. This is all very strange, since it only reproduces when I use my project, even with the simple repro.
Do you have any ideas where to put prints/breakpoints to try to understand where this is coming from?
I reproduced this in a clean project by adding mobile_scanner as a dependency. I guess it is yet another x64 simulator bug similar to #155401 and #163380.
Steps to reproduce
TextField
I can't reproduce this in a fresh
flutter create
project even though I am using the same code sample.This is also only reproducible on iOS Simulator. This leads me to believe that this is not a framework issue but rather a Simulator or engine one and there are additional conditions to trigger this. I would appreciate any suggestions to try to track down the source of the issue so that I can provide a reproducible code sample.
I have used a fresh simulator (you can even see the first time tip when I open the keyboard).
Expected results
No spaces are added between characters.
Actual results
One space is added between the letters, but not symbols when changing the cursor position.
See the screen recording.
Code sample
I am unable to reproduce this on a fresh project, but this code reproduces the issue in my project.
Code sample
Screenshots or Video
Screenshots / Video demonstration
Screen.Recording.2025-04-24.mp4
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: