mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
lockscreen: Forward keyboard key immediately to password bar
Currently, only the second key press gets forwarded to the password bar. Ensure that the first key is also forwarded correctly.
This commit is contained in:
parent
eecbba3f03
commit
b6f2740ff4
1 changed files with 4 additions and 2 deletions
|
|
@ -35,11 +35,13 @@ Item {
|
|||
}
|
||||
|
||||
// Listen for keyboard events, and focus on input area
|
||||
Keys.onPressed: {
|
||||
Keys.onPressed: (event) => {
|
||||
if (flickableLoader.item) {
|
||||
root.lockScreenState.isKeyboardMode = true;
|
||||
flickableLoader.item.goToOpenPosition();
|
||||
passwordBar.textField.forceActiveFocus();
|
||||
|
||||
passwordBar.keyPress(event.text);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -176,7 +178,7 @@ Item {
|
|||
|
||||
// Clear entered password after closing keypad
|
||||
onOpenFactorChanged: {
|
||||
if (flickable.openFactor < 0.1) {
|
||||
if (flickable.openFactor < 0.1 && !flickable.movingUp) {
|
||||
root.passwordBar.clear();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue