summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorATMDA <atdma2600@gmail.com>2025-11-14 18:00:24 -0500
committerATMDA <atdma2600@gmail.com>2025-11-14 18:00:24 -0500
commit9a08d6666eeef12608a834bdd54147d5075c10cd (patch)
treee5c6d64b1f1b6007a9147c441559d7986a4317ef
parentcontrolcenter: connected wireless network at top of list (diff)
downloadcaelestia-shell-9a08d6666eeef12608a834bdd54147d5075c10cd.tar.gz
caelestia-shell-9a08d6666eeef12608a834bdd54147d5075c10cd.tar.bz2
caelestia-shell-9a08d6666eeef12608a834bdd54147d5075c10cd.zip
controlcenter: auto-focus reliably for wireless password input
-rw-r--r--modules/controlcenter/network/WirelessPasswordDialog.qml19
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();
+ });
}
}
}