10000 [Apple Pencil][Regression] CupertinoTextField doesn't accept input from Apple Pencil · Issue #171510 · flutter/flutter · GitHub
[go: up one dir, main page]

Skip to content
[Apple Pencil][Regression] CupertinoTextField doesn't accept input from Apple Pencil #171510
Open
@danagbemava-nc

Description

@danagbemava-nc

Steps to reproduce

  1. Create a new flutter app
  2. Run the code sample below on an iPad with an Apple Pencil
  3. Try to scribble some text in both text fields.

Expected results

Both CupertinoTextField and the material TextField accept the input from the pencil

Actual results

The material TextField accepts input but the CupertinoTextField does not accept the input

This works as expected on the current stable, but not on beta or master

I bisected this to #166952 but I don't see how that could be the cause (maybe I missed something in one of the steps)

Master 3.33.0-1.0.pre.205 is the last version that works as expected.

Code sample

Code sample
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: Center(
          child: SizedBox(
            width: 300.0, // Give the text field a reasonable width
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                CupertinoTextField(
                  stylusHandwritingEnabled: true,
                  placeholder: 'Enter text here',
                  padding: const EdgeInsets.symmetric(
                    vertical: 12.0,
                    horizontal: 16.0,
                  ),
                  decoration: BoxDecoration(
                    border: Border.all(
                      color: CupertinoColors.systemGrey4,
                      width: 1.0,
                    ),
                    borderRadius: BorderRadius.circular(8.0),
                  ),
                  textAlign: TextAlign.center, // Center the input text
                  keyboardType: TextInputType.text,
                  textInputAction: TextInputAction.done,
                ),
                TextField(),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
stable latest master
ScreenRecording_07-02-2025.09-27-36_1.MP4
ScreenRecording_07-02-2025.08-42-32_1.MP4

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.32.5, on macOS 15.5 24F74 darwin-arm64, locale en-US) [602ms]
    • Flutter version 3.32.5 on channel stable at /Users/deanli/dev/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fcf2c11572 (8 days ago), 2025-06-24 1
AC08
1:44:07 -0700
    • Engine revision dd93de6fb1
    • Dart version 3.8.1
    • DevTools version 2.45.1

[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [2.1s]
    • Android SDK at /Users/deanli/Library/Android/sdk
    • Platform android-36, build-tools 36.0.0
    • Java binary at: /Users/deanli/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.6+-13391695-b895.109)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 26.0) [1,248ms]
    • Xcode at /Applications/Xcode-26.0.0-Beta.2.app/Contents/Developer
    • Build 17A5241o
    • CocoaPods version 1.16.2

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

[✓] Android Studio (version 2025.1) [9ms]
    • Android Studio at /Users/deanli/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.6+-13391695-b895.109)

[✓] VS Code (version 1.100.3) [8ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.112.0

[✓] Connected device (6 available) [6.9s]
    • iPhone 16 Pro Max (wireless) (mobile) • 00008140-00194CC23A68801C            • ios            • iOS 26.0 23A5276f
    • Nexus (wireless) (mobile)             • 00008020-001875E83A38002E            • ios            • iOS 18.5 22F76
    • Dean’s iPad (wireless) (mobile)       • 00008103-000825C811E3401E            • ios            • iOS 26.0 23A5260n
    • iPhone 16 Pro (mobile)                • 38325374-D93B-423B-B385-813AAD3B304D • ios            • com.apple.CoreSimulator.SimRuntime.iOS-26-0 (simulator)
    • macOS (desktop)                       • macos                                • darwin-arm64   • macOS 15.5 24F74 darwin-arm64
    • Chrome (web)                          • chrome                               • web-javascript • Google Chrome 138.0.7204.93
    ! Error: Browsing on the local area network for 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 [807ms]
    • All expected network resources are available.

• No issues found!
[!] Flutter (Channel master, 3.33.0-1.0.pre.790, on macOS 15.5 24F74 darwin-arm64, locale en-US) [3.7s]
    • Flutter version 3.33.0-1.0.pre.790 on channel master at /Users/deanli/dev/master
    ! Warning: `flutter` on your path resolves to /Users/deanli/dev/stable/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/deanli/dev/master. Consider adding /Users/deanli/dev/master/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/deanli/dev/stable/bin/dart, which is not inside your current Flutter SDK checkout at /Users/deanli/dev/master. Consider adding /Users/deanli/dev/master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b4bdbbaea9 (4 hours ago), 2025-07-02 01:48:16 -0400
    • Engine revision b4bdbbaea9
    • Dart version 3.9.0 (build 3.9.0-293.0.dev)
    • DevTools version 2.48.0-dev.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets
    • 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 36.0.0) [2.2s]
    • Android SDK at /Users/deanli/Library/Android/sdk
    • Emulator version 35.6.10.0 (build_id 13579150) (CL:N/A)
    • Platform android-36, build-tools 36.0.0
    • Java binary at: /Users/deanli/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.6+-13391695-b895.109)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 26.0) [1,487ms]
    • Xcode at /Applications/Xcode-26.0.0-Beta.2.app/Contents/Developer
    • Build 17A5241o
    • CocoaPods version 1.16.2

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

[✓] Android Studio (version 2025.1) [10ms]
    • Android Studio at /Users/deanli/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.6+-13391695-b895.109)

[✓] VS Code (version 1.100.3) [9ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.112.0

[✓] Connected device (6 available) [7.2s]
    • iPhone 16 Pro Max (wireless) (mobile) • 00008140-00194CC23A68801C            • ios            • iOS 26.0 23A5276f
    • Nexus (wireless) (mobile)             • 00008020-001875E83A38002E            • ios            • iOS 18.5 22F76
    • Dean’s iPad (wireless) (mobile)       • 00008103-000825C811E3401E            • ios            • iOS 26.0 23A5260n
    • iPhone 16 Pro (mobile)                • 38325374-D93B-423B-B385-813AAD3B304D • ios            • com.apple.CoreSimulator.SimRuntime.iOS-26-0 (simulator)
    • macOS (desktop)                       • macos                                • darwin-arm64   • macOS 15.5 24F74 darwin-arm64
    • Chrome (web)                          • chrome                               • web-javascript • Google Chrome 138.0.7204.93
    ! Error: Browsing on the local area network for 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 [1,290ms]
    • All expected network resources are available.

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: tabletTablets and landscape phonesa: text inputEntering text in a text field or keyboard related problemsc: regressionIt was better in the past than it is nowf: cupertinoflutter/packages/flutter/cupertino repositoryfound in release: 3.33Found to occur in 3.33frameworkflutter/packages/flutter repository. See also f: labels.from: manual-qaIssue caught from manual QA processhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyteam-text-inputOwned by Text Input team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0