Skip to content

VoiceOver: App crashes when user taps on search field if it contains at least one character #49718

@StrawHt

Description

@StrawHt

Steps to Reproduce

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Builder(
        builder: (context) => Scaffold(
            appBar: AppBar(
              title: Text('Click on the box below!'),
            ),
            body: Container(
              padding: EdgeInsets.only(left: 25.0, right: 25.0),
              height: 45.0,
              child: Center(
                child: Row(
                  children: <Widget>[
                    Padding(
                      padding: EdgeInsets.only(right: 8.0),
                      child: Icon(
                        Icons.search,
                        color: Colors.black26,
                        size: 20.0,
                      ),
                    ),
                    Expanded(
                        child: TextField(
                      keyboardType: TextInputType.text,
                      decoration: InputDecoration(
                          border: InputBorder.none,
                          hintText: '想喝点什么?',
                          hintStyle: TextStyle(color: Colors.black26)),
                      cursorColor: Theme.of(this.context).accentColor,
                      onChanged: (value) {
                        print('value');
                      },
                    )),
                  ],
                ),
              ),
            )),
      ),
    );
  }
}

1.Tap on the search field

  1. Enter any character into the field

  2. Tap on the search filed

Expected results: Nothing happens, maybe just voice what's currently in the textfield

Actual results: App Crashes

Logs
Attached Logs as txt file
[logs.txt](https://github.com/flutter/flutter/files/4129973/logs.txt)


Jasons-MacBook-Pro:mobile jasonzheng$ flutter analyze
Analyzing mobile...                                                     
No issues found! (ran in 2.6s)
Jasons-MacBook-Pro:mobile jasonzheng$ flutter doctor -v
[✓] Flutter (Channel beta, v1.12.13+hotfix.6, on Mac OS X 10.14.6 18G103, locale en-US)
    • Flutter version 1.12.13+hotfix.6 at /Volumes/Data/Sources/flutter
    • Framework revision 18cd7a3601 (7 weeks ago), 2019-12-11 06:35:39 -0800
    • Engine revision 2994f7e1e6
    • Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/jasonzheng/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 28.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_202-release-1483-b49-5587405)
    • All Android licenses accepted.

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

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 41.1.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

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

[✓] Connected device (1 available)
    • iPhone 8 • E8AF60AD-9C6C-47B6-BAB6-D8B33774F127 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)


Metadata

Metadata

Assignees

No one assigned

    Labels

    a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)a: text inputEntering text in a text field or keyboard related problemsf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions