From 915e446c07ca5c7338dd7b8b5805232449c08c19 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 4 May 2020 21:31:38 +0200 Subject: [PATCH] luci-base: ui.js: fix UITextfield.setValue() Fixes: d02c26772 ("luci-base: ui.js: rework password input handling") Signed-off-by: Jo-Philipp Wich --- modules/luci-base/htdocs/luci-static/resources/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js index c206e02af..822b572a3 100644 --- a/modules/luci-base/htdocs/luci-static/resources/ui.js +++ b/modules/luci-base/htdocs/luci-static/resources/ui.js @@ -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; } }); -- 2.25.1