-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-webWeb applications specificallyWeb applications specifically
Description
In browsers onSubmitted of TextField invoked on Enter and if another TextField is clicked.
Expected:
- on
Enterclicked -onSubmittedinvocation; - on another
TextFieldclicked - only focus change (withoutonSubmittedinvocation).
Steps to Reproduce
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
color: Colors.white,
padding: const EdgeInsets.all(24.0),
child: Material(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
TextField(
decoration: InputDecoration(hintText: 'TextField #1'),
onSubmitted: (text) {
print('TextField #1 onSubmitted: $text');
},
),
TextField(
decoration: InputDecoration(hintText: 'TextField #2'),
onSubmitted: (text) {
print('TextField #2 onSubmitted: $text');
},
),
],
),
),
);
}
}Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.13.6, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.5)
[✓] IntelliJ IDEA Community Edition (version 2019.2)
[✓] Connected device (3 available)
• No issues found!
rich-j, polina-c, orestesgaolin, NicolasDionB, offnewman and 2 more
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-webWeb applications specificallyWeb applications specifically