fix(@desktop/onboarding): Clearing error message when password confirmation is empty
Fix #5319
This commit is contained in:
parent
0bb594d05f
commit
146ff7a48b
|
@ -49,6 +49,11 @@ Column {
|
|||
}
|
||||
|
||||
function checkPasswordMatches(onlyIfConfirmPasswordHasFocus = true) {
|
||||
if (confirmPswInput.textField.text.length === 0) {
|
||||
errorTxt.text = ""
|
||||
return
|
||||
}
|
||||
|
||||
if (onlyIfConfirmPasswordHasFocus && !confirmPswInput.textField.focus) {
|
||||
return
|
||||
}
|
||||
|
@ -301,7 +306,12 @@ Column {
|
|||
keepHeight: true
|
||||
textField.rightPadding: showHideConfirmIcon.width + showHideConfirmIcon.anchors.rightMargin + Style.current.padding / 2
|
||||
|
||||
onTextChanged: { if(textField.text.length === newPswInput.text.length) root.checkPasswordMatches() }
|
||||
onTextChanged: {
|
||||
if(textField.text.length === newPswInput.text.length || textField.text.length === 0) {
|
||||
root.checkPasswordMatches()
|
||||
}
|
||||
}
|
||||
|
||||
textField.onFocusChanged: {
|
||||
// When clicking into the confirmation input, validate if new password:
|
||||
if(textField.focus) {
|
||||
|
|
Loading…
Reference in New Issue