Commit 298ffbc2 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
(cherry picked from commit 923ce7e5)
parent ffadcb34
Pipeline #197070 passed with stage
in 7 minutes and 4 seconds
......@@ -67,18 +67,12 @@ PlasmaCore.ColorScope {
function onPrompt(msg) {
root.notification = msg;
mainBlock.echoMode = TextInput.Normal
if (lockScreenUi.hadPrompt) {
mainBlock.mainPasswordBox.text = "";
}
mainBlock.showPassword = true;
mainBlock.mainPasswordBox.forceActiveFocus();
lockScreenUi.hadPrompt = true;
}
function onPromptForSecret(msg) {
mainBlock.echoMode = TextInput.Password
if (lockScreenUi.hadPrompt) {
mainBlock.mainPasswordBox.text = "";
}
mainBlock.showPassword = false;
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