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

With Textformfield the cursor cannot move at the middle of a word. #58638

Closed
GENL opened this issue Jun 3, 2020 · 14 comments
Closed

With Textformfield the cursor cannot move at the middle of a word. #58638

GENL opened this issue Jun 3, 2020 · 14 comments
Labels
a: desktop Running on desktop a: text input Entering text in a text field or keyboard related problems f: material design flutter/packages/flutter/material repository. found in release: 1.18 Occurs in 1.18 found in release: 1.19 Found to occur in 1.19 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on P3 Issues that are less important to the Flutter project platform-web Web applications specifically

Comments

@GENL
Copy link

GENL commented Jun 3, 2020

Hi! With TextFormField and TextField if tap a word inside of the field the cursor is not moved at the place. It moves only when I type a white space.
Is it voluntary from Flutter, how cannot we change this behavior?

I have been dealing with this behavior on all flutter channels for a long time.

@VladyslavBondarenko
Copy link

I can change cursor position by tapping on Android. On iOS I can't change it by tapping, but I can drag the cursor, the same and for native android apps.
I cannot change cursor position in web and desktop (tried MacOS desktop)

flutter doctor -v
[✓] Flutter (Channel master, 1.19.0-4.0.pre.47, on Mac OS X 10.15.5 19F101, locale en-GB)
    • Flutter version 1.19.0-4.0.pre.47 at /Users/nevercode/dev/flutter
    • Framework revision 28138ec5e3 (5 hours ago), 2020-06-04 00:33:01 -0400
    • Engine revision 2608f2ee9f
    • Dart version 2.9.0 (build 2.9.0-13.0.dev 54adfeb93f)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/nevercode/Library/Android/sdk
    • Platform android-29, build-tools 29.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.5, Build version 11E608c
    • CocoaPods version 1.9.1

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

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

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

[✓] Connected device (4 available)
    • Redmi Note 7 • 6345c469   • android-arm64  • Android 9 (API 28)
    • macOS        • macOS      • darwin-x64     • Mac OS X 10.15.5 19F101
    • Web Server   • web-server • web-javascript • Flutter Tools
    • Chrome       • chrome     • web-javascript • Google Chrome 83.0.4103.61

• No issues found!

@GENL do you mean web?

@VladyslavBondarenko VladyslavBondarenko added a: desktop Running on desktop a: text input Entering text in a text field or keyboard related problems found in release: 1.18 Occurs in 1.18 found in release: 1.19 Found to occur in 1.19 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-web Web applications specifically P2 Important issues not at the top of the work list labels Jun 4, 2020
@GENL
Copy link
Author

GENL commented Jun 4, 2020

No not web. This behavior happens on Android devices.

@GENL
Copy link
Author

GENL commented Jun 4, 2020

@VladyslavBondarenko your answer helped me. When I read you I asked myself if the problem wasn't by my side. So I looked up through my app and I found out in the ThemeData of the MaterialApp, I had set platform: Platform.ios instead of Platform.android.

Everything is ok now. Thanks

@GENL GENL closed this as completed Jun 4, 2020
@VladyslavBondarenko
Copy link

@GENL
I'll reopen it in order to keep track the issue about web and desktop

@HansMuller HansMuller added the f: material design flutter/packages/flutter/material repository. label Jun 4, 2020
@yjbanov yjbanov added the assigned for triage issue is assigned to a domain expert for further triage label Jun 4, 2020
@mdebbar
Copy link
Contributor

mdebbar commented Jun 10, 2020

Could you clarify what the issue is here? On iOS, we place the cursor at the beginning or end of a word when you tap. That's how iOS behaves so we try to mimic it.

@mdebbar mdebbar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jun 10, 2020
@mdebbar mdebbar removed their assignment Jun 10, 2020
@mdebbar mdebbar removed the assigned for triage issue is assigned to a domain expert for further triage label Jun 10, 2020
@VladyslavBondarenko
Copy link

@mdebbar
I left the issue open not because of iOS, but because of web and desktop (tried with MacOS desktop), where I can't move cursor to the middle of words as well.
Tried with current beta 1.19.0-4.1.pre, current dev 1.19.0-5.0.pre, current master 1.19.0-6.0.pre.57.

code sample
import 'package:flutter/material.dart';

void main() => runApp(MaterialApp(home: MyApp()));

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: Scaffold(
        body: Center(
          child: TextField(),
        ),
      ),
    );
  }
}

@yjbanov yjbanov added P3 Issues that are less important to the Flutter project and removed P2 Important issues not at the top of the work list labels Jun 16, 2020
@geriby23
Copy link

I have the same issue. I'm on macOS and I can't move the cursor to the middle of the word by my mouse(It's flutter web).
But I have tested it on the different platforms and noticed that flutter web when it's running on some other OS(for example Windows) has the behavior of an android app where I'm able to put the cursor in the middle of the word. And macOS have the behavior of the ios app. I think flutter web inputs should have a unique solution for this, the user should be able to edit his input by clicking on the typo place by mouse. Currently, there is a possibility for macOS users to edit input word by placing cursor with arrow buttons.

@phackwer
Copy link

Originally (about a month-45 days ago) we didn't had this issue.

@VladyslavBondarenko VladyslavBondarenko removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jul 1, 2020
@pedromassangocode
Copy link

Hi @GENL @VladyslavBondarenko
I cannot reproduce the issue anymore on latest master channel.

gif

Closing as probably fixed, if you disagree please feel free to write a comment providing more details bellow and I will reopen it.
Thank you

flutter doctor -v
[✓] Flutter (Channel master, 1.26.0-2.0.pre.117, on Mac OS X 10.15.7 19H2 darwin-x64, locale en)
    • Flutter version 1.26.0-2.0.pre.117 at /Users/pedromassango/dev/SDKs/flutter_master
    • Framework revision 15c009b805 (10 hours ago), 2020-12-22 20:09:03 -0500
    • Engine revision b7cd3f8e70
    • Dart version 2.12.0 (build 2.12.0-173.0.dev)

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

[✓] IntelliJ IDEA Community Edition (version 2020.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 52.1.5
    • Dart plugin version 203.5981.152

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

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • Mac OS X 10.15.7 19H2 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 87.0.4280.88

! Doctor found issues in 1 category.
Process finished with exit code 0

@emreakcan
Copy link

emreakcan commented May 8, 2021

Hey all, I'm having this issue on ios 12 pro max simulator.

Ahh. its normal behavior on iOS, you should tap&hold

Screen.Recording.2021-05-08.at.19.25.09.mov

[✓] Flutter (Channel stable, 2.0.6, on Mac OS X 10.15.7 19H524 darwin-x64, locale en-GB)
    • Flutter version 2.0.6 at /Users/emreakcan/Documents/flutter
    • Framework revision 1d9032c7e1 (9 days ago), 2021-04-29 17:37:58 -0700
    • Engine revision 05e680e202
    • Dart version 2.12.3

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/emreakcan/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • 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.4, Build version 12D4e
    • CocoaPods version 1.10.1

[✓] 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)

[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 55.1.4
    • Dart plugin version 203.8173

[✓] Connected device (2 available)
    • iPhone 12 Pro Max (mobile) • F146217F-A73A-4E38-9E16-5EB713374255 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 90.0.4430.93

• No issues found!

@pedromassango

@Sylvain17
Copy link

Sylvain17 commented May 24, 2021

Because I thought the bug was here again
==> Normal behavior on iOS

For "Hello world"

  • If you only tap, the cursor is placed at the beginning or at the end of one of your words
  • If you "tap & hold" you can go inside the word (and at the same time, "Paste | Select All" becomes visible)

It's ok for me (iOS 14.5.1 / flutter stable channel 2.2.0)

@jasonhoo95
Copy link

jasonhoo95 commented Jun 23, 2021

is this normal on ios, tap and hold only go inside the word, cause normally you should just tap the word and then should go inside right? I think this is a bug right?
Is there a way where no need to tap and hold just press and then can go inside the textfield?

@jasonhoo95
Copy link

This is really a major bugs, most of the ios app they can go inside the text only flutter cannot this is really not user friendly

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: desktop Running on desktop a: text input Entering text in a text field or keyboard related problems f: material design flutter/packages/flutter/material repository. found in release: 1.18 Occurs in 1.18 found in release: 1.19 Found to occur in 1.19 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on P3 Issues that are less important to the Flutter project platform-web Web applications specifically
Projects
None yet
Development

No branches or pull requests