mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-24 20:59:37 +08:00
fix desktop dialog request focus
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
3e4a867115
commit
19f04f29c0
@ -608,12 +608,11 @@ class CustomAlertDialog extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
FocusNode focusNode = FocusNode();
|
||||
// request focus if there is no focused FocusNode in the dialog
|
||||
Future.delayed(Duration.zero, () {
|
||||
if (!focusNode.hasFocus) focusNode.requestFocus();
|
||||
});
|
||||
// request focus
|
||||
FocusScopeNode scopeNode = FocusScopeNode();
|
||||
Future.delayed(Duration.zero, () {
|
||||
if (!scopeNode.hasFocus) scopeNode.requestFocus();
|
||||
});
|
||||
return FocusScope(
|
||||
node: scopeNode,
|
||||
autofocus: true,
|
||||
|
@ -666,6 +666,8 @@ Future<bool?> verificationCodeDialog(UserPayload? user) async {
|
||||
child: const LinearProgressIndicator()),
|
||||
],
|
||||
),
|
||||
onCancel: close,
|
||||
onSubmit: onVerify,
|
||||
actions: [
|
||||
dialogButton("Cancel", onPressed: close, isOutline: true),
|
||||
dialogButton("Verify", onPressed: onVerify),
|
||||
|
@ -653,6 +653,7 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
||||
));
|
||||
}
|
||||
if (pi.platform != kPeerPlatformAndroid &&
|
||||
pi.platform != kPeerPlatformMacOS && // unsupport yet
|
||||
version_cmp(peer_version, '1.2.0') >= 0) {
|
||||
displayMenu.add(MenuEntryButton<String>(
|
||||
childBuilder: (TextStyle? style) => Text(
|
||||
|
Loading…
Reference in New Issue
Block a user