luci-base: ui.js: fix UITextfield.setValue()
authorJo-Philipp Wich <jo@mein.io>
Mon, 4 May 2020 19:31:38 +0000 (21:31 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 4 May 2020 19:31:38 +0000 (21:31 +0200)
Fixes: d02c26772 ("luci-base: ui.js: rework password input handling")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/ui.js

index c206e02af8e00c8f48d977e301fcc5d539adaaa5..822b572a3d8df998a8429c1001aa2ee62be1082e 100644 (file)
@@ -368,7 +368,7 @@ var UITextfield = UIElement.extend(/** @lends LuCI.ui.Textfield.prototype */ {
 
        /** @override */
        setValue: function(value) {
-               var inputEl = this.node.childNodes[+!!this.options.password];
+               var inputEl = this.node.querySelector('input');
                inputEl.value = value;
        }
 });