Add ability to mask passwords (#494)

* add ability to mask passwords

* remove duplicate mask snapshot

* make sure only one click happens at a time
This commit is contained in:
Justin Halsall
2026-04-01 12:00:00 +08:00
committed by GitHub
parent 53a2e8baa4
commit a4426d2927
8 changed files with 359 additions and 556 deletions

View File

@@ -359,10 +359,7 @@ function initInputObserver(
return;
}
const type: string | undefined = (target as HTMLInputElement).type;
if (
type === 'password' ||
(target as HTMLElement).classList.contains(ignoreClass)
) {
if ((target as HTMLElement).classList.contains(ignoreClass)) {
return;
}
let text = (target as HTMLInputElement).value;