tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 44dca5111b4e2b7e68f7b31dd59d4c9a10a79378
parent 3babafbc8b63f682d1420a67ab5e33989f7fa324
Author: Maile Lucks <maile.lucks@gmail.com>
Date:   Tue, 14 Oct 2025 15:40:50 +0000

Bug 1991435 - Ensure validation messaging and visual obscurity on password input within passwords toolbar panel - r=mtigley,credential-management-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D267320

Diffstat:
Mtoolkit/components/satchel/megalist/content/components/login-form/login-form.mjs | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/toolkit/components/satchel/megalist/content/components/login-form/login-form.mjs b/toolkit/components/satchel/megalist/content/components/login-form/login-form.mjs @@ -43,6 +43,7 @@ export class LoginForm extends MozLitElement { this.originValue = ""; this.usernameValue = ""; this.passwordValue = ""; + this.isInvalid = false; this._showDeleteCard = false; } @@ -96,7 +97,7 @@ export class LoginForm extends MozLitElement { } #shouldShowWarning(field, input, warning) { - if (!input.checkValidity()) { + if (!input.checkValidity() || this.isInvalid) { // FIXME: for some reason checkValidity does not apply the :invalid style // to the field. For now, we reset the input value to "" apply :invalid // styling. @@ -123,6 +124,8 @@ export class LoginForm extends MozLitElement { this.#removeWarning(warning); field.removeAttribute("aria-describedby"); } + + this.isInvalid = !field.input.checkValidity(); } onCancel(e) {