Repository: flutter
Issue: iOS "Scribble" feature: cannot tap on text selection controls with Apple Pencil
Labels: a: text input,platform-ios,has reproducible steps,P2,team-text-input,triaged-text-input,found in release: 3.24,found in release: 3.27

### Steps to reproduce

1. Add a `TextField` or a `CupertinoTextField` to the application (see sample code below).
2. Add some text using the [scribble](https://support.apple.com/guide/ipad/enter-text-with-scribble-ipad355ab2a7/ipados) feature with the Apple Pencil.
3. Select some of the text.
4. Now try to hit a button on the text selection controls (e.g. "copy") **using the Apple Pencil**. 

### Expected results

As in other iOS apps, it should be possible to copy, cut, etc. by hitting the corresponding button with the **Apple Pencil**.

### Actual results

The button is not hit; instead, the input seems to be directed to the underlying canvas. (See attached video.)
If the buttons are tapped with the finger, though, they work just fine.

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MainApp());
}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: ConstrainedBox(
            constraints: const BoxConstraints(maxWidth: 450),
            child: CupertinoTextField(
              scribbleEnabled: true,
              selectionControls: cupertinoTextSelectionControls,
            ),
          ),
        ),
      ),
    );
  }
}
```

(Note that I customized the `selectionControls` parameter because of #158177).

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

https://github.com/user-attachments/assets/e7401272-047f-4581-92ab-bdf1d1dd3723

</details>


### Logs

<details open><summary>Logs</summary>
(not applicable)
</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.24.4, on macOS 15.1 24B83 darwin-arm64, locale en-US)
    • Flutter version 3.24.4 on channel stable at /Users/redge/Shared/SDKs/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 603104015d (12 days ago), 2024-10-24 08:01:25 -0700
    • Engine revision db49896cf2
    • 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/redge/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 17.0.11+0-17.0.11b1207.24-11852314)
    • 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.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.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 17.0.11+0-17.0.11b1207.24-11852314)

[✓] IntelliJ IDEA Ultimate Edition (version 2022.3.1)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • 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

[✓] VS Code (version 1.95.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.101.20241031

[✓] Connected device (5 available)
    • Daniels iPad Air (mobile)       • 00008112-000108C13E81A01E • ios            • iOS 18.1 22B83
    • iPhone Mini Daniel (mobile)     • 00008110-001C410C2112401E • ios            • iOS 18.1 22B83
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 15.1 24B83 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin         • macOS 15.1 24B83 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 130.0.6723.92

[✓] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>