Repository: flutter
Issue: [Android] TextField cursor doesn't move to tapped position, but converts into text selection mode after selecting input mode from virtual keyboard.
Labels: a: text input,e: device-specific,platform-android,framework,f: material design,has reproducible steps,P2,e: samsung,found in release: 3.0,found in release: 3.1,f: selection,team-text-input

**UPDATE:** For current status, see https://github.com/flutter/flutter/issues/98720#issuecomment-1548704965 and thereafter.

.

.

Original report follows.

---

I found an issue with TextField, I'm not sure if it's intended or not.
After entering text in the TextField, if you select the text in the middle, the cursor should move to that position.
However, if you add two exclamation marks after the text and select the middle of the text, the cursor does not move to that location, but selects up to that location.

This issue was found in both English and Korean.

## Steps to Reproduce
1. Enter arbitrary strings in the TextField.
2. Finally, enter two exclamation marks.
3. Click in the middle of the text.
4. Instead of moving the cursor to that position, it is selected from the back to the selected point.

https://user-images.githubusercontent.com/26322627/154611611-48731563-9fa1-4270-b1d7-7aebfe5e0a1c.mp4


<details>
<summary>Code sample</summary>

<!--
      Please create a minimal reproducible sample that shows the problem
      and attach it below between the lines with the backticks.

      To create it you can use `flutter create bug` command and update the `main.dart` file.

      Alternatively, you can use https://dartpad.dev/
      which is capable of creating and running small Flutter apps.

      Without this we will unlikely be able to progress on the issue, and because of that
      we regretfully will have to close it.
-->

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: const [
            Padding(
              padding: EdgeInsets.all(8.0),
              child: TextField(),
            ),
          ],
        ),
      ),
    );
  }
}
```

</details>

<details>
  <summary>flutter doctor -v</summary>

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[✓] Flutter (Channel unknown, 2.11.0-0.0.pre.542, on macOS 12.0.1 21A559 darwin-x64, locale ko-KR)
    • Flutter version 2.11.0-0.0.pre.542 at /Users/nero/Project/FlutterContribution/flutter
    • Upstream repository unknown
    • Framework revision 1958656943 (4 days ago), 2022-02-14 05:15:17 -0500
    • Engine revision b63614c306
    • Dart version 2.17.0 (build 2.17.0-104.0.dev)
    • DevTools version 2.10.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/nero/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Volumes/Lecture HD/Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] 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 44.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] Android Studio (version 2020.3)
    • Android Studio at /Volumes/Lecture HD/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.10+0-b96-7281165)

[✓] VS Code (version 1.64.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.34.0

[✓] VS Code (version 1.63.2)
    • VS Code at /Volumes/Lecture HD/Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.34.0

[✓] Connected device (3 available)
    • SM G950N (mobile)  • ce0317136a2c08f10c                   • android-arm64  • Android 9 (API 28)
    • iPhone 13 (mobile) • 2A06E0D7-FBAB-4FBD-AFA9-34FB720E1B61 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-2
      (simulator)
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 98.0.4758.102

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
```

</details>


<!--
      Consider also attaching screenshots and/or videos to better
      illustrate the issue.

      You can upload them directly on GitHub.
      Beware that video file size is limited to 10MB.
-->