Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@mdebbar
Copy link
Contributor

@mdebbar mdebbar commented May 12, 2022

The inputmode attribute is useful in mobile browsers to display the correct type of keyboard (e.g. numbers, email, etc).

For plain text input, we can either omit the inputmode attribute or use inputmode="text" (which corresponds to the default value). But in Android Chrome, using inputmode="text" causes the text field to not send the right keyCode for ENTER.

The fix is to omit inputmode in plain text fields.

Fixes flutter/flutter#89384

@mdebbar mdebbar requested review from ditman and harryterkelsen May 12, 2022 16:42
@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label May 12, 2022
String getEditingInputMode() {
return textEditing!.strategy.domElement!.getAttribute('inputmode')!;
String? getEditingInputMode() {
return textEditing!.strategy.domElement!.getAttribute('inputmode');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find! I didn't know about that one, but it definitely should be nullable.

dart-lang/sdk#49014

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[WEB] TextField actions are not triggered on Android

2 participants