diff options
| -rw-r--r-- | modules/controlcenter/network/WirelessPasswordDialog.qml | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/modules/controlcenter/network/WirelessPasswordDialog.qml b/modules/controlcenter/network/WirelessPasswordDialog.qml index 31372e0..d0c023f 100644 --- a/modules/controlcenter/network/WirelessPasswordDialog.qml +++ b/modules/controlcenter/network/WirelessPasswordDialog.qml @@ -171,11 +171,26 @@ Item { property string passwordBuffer: "" Connections { + target: root.session.network + function onShowPasswordDialogChanged(): void { + if (root.session.network.showPasswordDialog) { + // Use callLater to ensure focus happens after dialog is fully rendered + Qt.callLater(() => { + passwordContainer.forceActiveFocus(); + passwordContainer.passwordBuffer = ""; + }); + } + } + } + + Connections { target: root function onVisibleChanged(): void { if (root.visible) { - passwordContainer.forceActiveFocus(); - passwordContainer.passwordBuffer = ""; + // Use callLater to ensure focus happens after dialog is fully rendered + Qt.callLater(() => { + passwordContainer.forceActiveFocus(); + }); } } } |