[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
wilder-5.22
Nate Graham 5 years ago
parent fcbfbcbfec
commit 1a60087b87
  1. 3
      lookandfeel/contents/lockscreen/LockScreenUi.qml
  2. 3
      sddm-theme/Main.qml

@ -328,6 +328,9 @@ PlasmaCore.ColorScope {
onKeyboardActiveChanged: { onKeyboardActiveChanged: {
if (keyboardActive) { if (keyboardActive) {
state = "visible"; state = "visible";
// Otherwise the password field loses focus and virtual keyboard
// keystrokes get eaten
mainBlock.mainPasswordBox.forceActiveFocus();
} else { } else {
state = "hidden"; state = "hidden";
} }

@ -258,6 +258,9 @@ PlasmaCore.ColorScope {
onKeyboardActiveChanged: { onKeyboardActiveChanged: {
if (keyboardActive) { if (keyboardActive) {
state = "visible" state = "visible"
// Otherwise the password field loses focus and virtual keyboard
// keystrokes get eaten
userListComponent.mainPasswordBox.forceActiveFocus();
} else { } else {
state = "hidden"; state = "hidden";
} }

Loading…
Cancel
Save