fix: disabled inputs are not trucated

This commit is contained in:
Andras Bacsai 2024-03-27 14:51:20 +01:00
parent a777db1234
commit 8cff40fdd4

View File

@ -82,10 +82,12 @@ function changePasswordFieldType(event) {
if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
if (element.type === 'password') {
element.type = 'text';
if (element.disabled) return;
element.classList.add('truncate');
this.type = 'text';
} else {
element.type = 'password';
if (element.disabled) return;
element.classList.remove('truncate');
this.type = 'password';
}