msgbox responds to numpadEnter as submit (#8248)

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages 2024-06-03 11:19:35 +08:00 committed by GitHub
parent 32ef5f47f8
commit 7d56717cf5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1008,7 +1008,7 @@ class CustomAlertDialog extends StatelessWidget {
return KeyEventResult.handled; // avoid TextField exception on escape
} else if (!tabTapped &&
onSubmit != null &&
key.logicalKey == LogicalKeyboardKey.enter) {
(key.logicalKey == LogicalKeyboardKey.enter || key.logicalKey == LogicalKeyboardKey.numpadEnter)) {
if (key is RawKeyDownEvent) onSubmit?.call();
return KeyEventResult.handled;
} else if (key.logicalKey == LogicalKeyboardKey.tab) {