mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-19 00:13:01 +08:00
dialog tab order
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
cc0f4509a7
commit
d793fa64a3
@ -613,8 +613,9 @@ class CustomAlertDialog extends StatelessWidget {
|
||||
Future.delayed(Duration.zero, () {
|
||||
if (!focusNode.hasFocus) focusNode.requestFocus();
|
||||
});
|
||||
return Focus(
|
||||
focusNode: focusNode,
|
||||
FocusScopeNode scopeNode = FocusScopeNode();
|
||||
return FocusScope(
|
||||
node: scopeNode,
|
||||
autofocus: true,
|
||||
onKey: (node, key) {
|
||||
if (key.logicalKey == LogicalKeyboardKey.escape) {
|
||||
@ -626,6 +627,11 @@ class CustomAlertDialog extends StatelessWidget {
|
||||
key.logicalKey == LogicalKeyboardKey.enter) {
|
||||
if (key is RawKeyDownEvent) onSubmit?.call();
|
||||
return KeyEventResult.handled;
|
||||
} else if (key.logicalKey == LogicalKeyboardKey.tab) {
|
||||
if (key is RawKeyDownEvent) {
|
||||
scopeNode.nextFocus();
|
||||
}
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
return KeyEventResult.ignored;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user