luci-base: remove static password-input from UI element
authorPaul Donald <newtwen+github@gmail.com>
Thu, 5 Feb 2026 21:24:27 +0000 (22:24 +0100)
committerPaul Donald <newtwen+github@gmail.com>
Thu, 5 Feb 2026 21:24:48 +0000 (22:24 +0100)
follow-up to fc8ad20bbb7d7df16aeda37e8c3bf8495bedc6c3

this should be sufficient for password managers to work

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
modules/luci-base/htdocs/luci-static/resources/ui.js

index b9ccb1e18708892e4eb2607154a274754a6e4613..45de90750473d27d8d53f6305b36a2f99baa9574 100644 (file)
@@ -371,7 +371,7 @@ const UITextfield = UIElement.extend(/** @lends LuCI.ui.Textfield.prototype */ {
                        'id': this.options.id ? `widget.${this.options.id}` : null,
                        'name': this.options.name,
                        'type': 'text',
-                       'class': `password-input ${this.options.password ? 'cbi-input-password' : 'cbi-input-text'}`,
+                       'class': this.options.password ? 'cbi-input-password' : 'cbi-input-text',
                        'readonly': this.options.readonly ? '' : null,
                        'disabled': this.options.disabled ? '' : null,
                        'maxlength': this.options.maxlength,
@@ -390,7 +390,7 @@ const UITextfield = UIElement.extend(/** @lends LuCI.ui.Textfield.prototype */ {
                                                // DOM manipulation (e.g. by password managers) may have inserted other
                                                // elements between the reveal button and the input. This searches for
                                                // the first <input> inside the parent of the <button> to use for toggle.
-                                               const e = this.parentElement.querySelector('input.password-input')
+                                               const e = this.parentElement.querySelector('input.cbi-input-password')
                                                if (e) {
                                                        e.type = (e.type === 'password') ? 'text' : 'password';
                                                } else {