Prevent bitPasswordInputToggle from re-enabling spellchecker

This commit is contained in:
lukaw3d 2024-01-21 00:52:38 +01:00
parent bf09a09b10
commit 6d6e0ffb8b
2 changed files with 3 additions and 4 deletions

View File

@ -64,7 +64,6 @@ export class BitPasswordInputToggleDirective implements AfterContentInit, OnChan
this.button.icon = this.icon;
if (this.formField.input?.type != null) {
this.formField.input.type = this.toggled ? "text" : "password";
this.formField.input.spellcheck = this.toggled ? false : undefined;
}
}
}

View File

@ -20,7 +20,7 @@ import { BitPasswordInputToggleDirective } from "./password-input-toggle.directi
<form>
<bit-form-field>
<bit-label>Password</bit-label>
<input bitInput type="password" />
<input bitInput appInputVerbatim type="password" />
<button type="button" bitIconButton bitSuffix bitPasswordInputToggle></button>
</bit-form-field>
</form>
@ -69,7 +69,7 @@ describe("PasswordInputToggle", () => {
});
it("spellcheck is disabled", () => {
expect(input.spellcheck).toBe(undefined);
expect(input.spellcheck).toBe(false);
});
});
@ -106,7 +106,7 @@ describe("PasswordInputToggle", () => {
});
it("spellcheck is disabled", () => {
expect(input.spellcheck).toBe(undefined);
expect(input.spellcheck).toBe(false);
});
});
});