From 1a60087b87d11f150c233dfeca685ee565ee03e7 Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Thu, 7 Jan 2021 17:20:28 -0700 Subject: [PATCH] [lock/login screens] Focus password field after virtual keyboard appears Without this, the virtual keyboard appears and takes focus, which doesn't make sense:the password field needs to retain focus or else the keystrokes you type using the virtual keyboard get eaten. BUG: 430209 FIXED-IN: 5.21 --- lookandfeel/contents/lockscreen/LockScreenUi.qml | 3 +++ sddm-theme/Main.qml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lookandfeel/contents/lockscreen/LockScreenUi.qml b/lookandfeel/contents/lockscreen/LockScreenUi.qml index 8c7c0fb0b..1112b8397 100644 --- a/lookandfeel/contents/lockscreen/LockScreenUi.qml +++ b/lookandfeel/contents/lockscreen/LockScreenUi.qml @@ -328,6 +328,9 @@ PlasmaCore.ColorScope { onKeyboardActiveChanged: { if (keyboardActive) { state = "visible"; + // Otherwise the password field loses focus and virtual keyboard + // keystrokes get eaten + mainBlock.mainPasswordBox.forceActiveFocus(); } else { state = "hidden"; } diff --git a/sddm-theme/Main.qml b/sddm-theme/Main.qml index 43e444eb8..84fb5401d 100644 --- a/sddm-theme/Main.qml +++ b/sddm-theme/Main.qml @@ -258,6 +258,9 @@ PlasmaCore.ColorScope { onKeyboardActiveChanged: { if (keyboardActive) { state = "visible" + // Otherwise the password field loses focus and virtual keyboard + // keystrokes get eaten + userListComponent.mainPasswordBox.forceActiveFocus(); } else { state = "hidden"; }