Skip to content

Focused TextField in readOnly state emits continuous Frame Events #108187

@mack-at-pieces

Description

@mack-at-pieces

Hey Flutter Team -

I have identified what seems to be an issue related to a focused readOnly: true TextField.

What's happening is the TextField in this state emits a continuous stream of Frame Events reflecting similar behavior to that of a readOnly: false TextField where the cursor animates in and out.

Your help would be very much appreciated.

Thanks!

Details

Steps to reproduce

  1. Clone the demo repository here: https://github.com/mack-at-pieces/flutter_text_field
  2. Run the demo app in profile mode using the command flutter run -d macos --profile.
  3. Open the Flutter DevTools debugger and profiler at the link provided by the command output
  4. Navigate to the running demo app and tap to bring into focus.
  5. At this point, the Frame Chart is idle and no events are occurring.
  6. Next, tap the TextField to bring focus as if you are going to input a value.
  7. Observe the Frame Chart and you will now see a continuous stream of events being emitted. This represents that of a readOnly: false TextField where the cursor animates in and out.

Demo

https://github.com/mack-at-pieces/flutter_text_field

Target Platform

macOS

I did not attempt to reproduce this on Windows, Linux, iOS, or Android, however I believe this problem may still be present on those platforms as well

Target OS version/browser

macOS Monterey Version 12.0.1

Devices

MacBook Pro (16-inch, 2021)
Chip: Apple M1 Max
Memory: 64 GB

Logs

Logs
mackmyers@Macks-MacBook-Pro flutter_text_field % flutter analyze
Analyzing flutter_text_field...                                         
No issues found! (ran in 0.9s)
mackmyers@Macks-MacBook-Pro flutter_text_field % flutter doctor -v
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.0.1 21A559 darwin-arm (Rosetta), locale en-US)
    • Flutter version 3.0.5 at /Users/mackmyers/Documents/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (9 days ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/mackmyers/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2021.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 11.0.11+0-b60-7772763)

[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 67.1.3
    • Dart plugin version 213.7371

[✓] VS Code (version 1.69.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 12.0.1 21A559 darwin-arm (Rosetta)
    • Chrome (web)    • chrome • web-javascript • Google Chrome 103.0.5060.134

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Metadata

Metadata

Labels

P2Important issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsc: performanceRelates to speed or footprint issues (see "perf:" labels)found in release: 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions