Commit 923ce7e5 authored by Derek Christ's avatar Derek Christ Committed by Nate Graham
Browse files

Fix password field in lock screen not clearing after failed login attempt

This bug was introduced by !1754.

`lockScreenUi.hadPrompt` was set to `false` in `onFailed()` to avoid
unintentionally clearing the password after the text field had faded
out after 10 seconds and the user pressed a button. Unfortunately this
also caused the password field to not clear right after the failed event.

So instead the statement is moved into the trigger of `fadeoutTimer` which
fixes both issues.

BUG: 455227
FIXED-IN: 5.25.3
parent 0742227e
Pipeline #197058 passed with stage
in 13 minutes and 18 seconds
......@@ -68,17 +68,11 @@ PlasmaCore.ColorScope {
function onPrompt(msg) {
root.notification = msg;
mainBlock.showPassword = true;
if (lockScreenUi.hadPrompt) {
mainBlock.mainPasswordBox.text = "";
}
mainBlock.mainPasswordBox.forceActiveFocus();
lockScreenUi.hadPrompt = true;
}
function onPromptForSecret(msg) {
mainBlock.showPassword = false;
if (lockScreenUi.hadPrompt) {
mainBlock.mainPasswordBox.text = "";
}
mainBlock.mainPasswordBox.forceActiveFocus();
lockScreenUi.hadPrompt = true;
}
......@@ -182,7 +176,10 @@ PlasmaCore.ColorScope {
Timer {
id: graceLockTimer
interval: 3000
onTriggered: authenticator.tryUnlock();
onTriggered: {
root.clearPassword();
authenticator.tryUnlock();
}
}
Component.onCompleted: PropertyAnimation { id: launchAnimation; target: lockScreenRoot; property: "opacity"; from: 0; to: 1; duration: PlasmaCore.Units.veryLongDuration * 2 }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment