fix: disabled inputs are not trucated
This commit is contained in:
@@ -82,10 +82,12 @@
|
|||||||
if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
|
if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
|
||||||
if (element.type === 'password') {
|
if (element.type === 'password') {
|
||||||
element.type = 'text';
|
element.type = 'text';
|
||||||
|
if (element.disabled) return;
|
||||||
element.classList.add('truncate');
|
element.classList.add('truncate');
|
||||||
this.type = 'text';
|
this.type = 'text';
|
||||||
} else {
|
} else {
|
||||||
element.type = 'password';
|
element.type = 'password';
|
||||||
|
if (element.disabled) return;
|
||||||
element.classList.remove('truncate');
|
element.classList.remove('truncate');
|
||||||
this.type = 'password';
|
this.type = 'password';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user