Skip to content

Commit 83a42aa

Browse files
committed
luci-base: remove static password-input from UI element
follow-up to fc8ad20 this should be sufficient for password managers to work Signed-off-by: Paul Donald <newtwen+github@gmail.com>
1 parent d2e42ca commit 83a42aa

File tree

1 file changed

+2
-2
lines changed
  • modules/luci-base/htdocs/luci-static/resources

1 file changed

+2
-2
lines changed

modules/luci-base/htdocs/luci-static/resources/ui.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ const UITextfield = UIElement.extend(/** @lends LuCI.ui.Textfield.prototype */ {
371371
'id': this.options.id ? `widget.${this.options.id}` : null,
372372
'name': this.options.name,
373373
'type': 'text',
374-
'class': `password-input ${this.options.password ? 'cbi-input-password' : 'cbi-input-text'}`,
374+
'class': this.options.password ? 'cbi-input-password' : 'cbi-input-text',
375375
'readonly': this.options.readonly ? '' : null,
376376
'disabled': this.options.disabled ? '' : null,
377377
'maxlength': this.options.maxlength,
@@ -390,7 +390,7 @@ const UITextfield = UIElement.extend(/** @lends LuCI.ui.Textfield.prototype */ {
390390
// DOM manipulation (e.g. by password managers) may have inserted other
391391
// elements between the reveal button and the input. This searches for
392392
// the first <input> inside the parent of the <button> to use for toggle.
393-
const e = this.parentElement.querySelector('input.password-input')
393+
const e = this.parentElement.querySelector('input.cbi-input-password')
394394
if (e) {
395395
e.type = (e.type === 'password') ? 'text' : 'password';
396396
} else {

0 commit comments

Comments
 (0)