From 53ac685092d62c84cc2add8ae726487b339d9576 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 18 Sep 2019 15:08:19 +0200 Subject: [PATCH] luci-base: form.js: fix default click action of button options Signed-off-by: Jo-Philipp Wich --- modules/luci-base/htdocs/luci-static/resources/form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index 7dc63ceb5..0fa0008c7 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -1822,7 +1822,7 @@ var CBIButtonValue = CBIValue.extend({ E('button', { 'class': 'cbi-button cbi-button-%s'.format(this.inputstyle || 'button'), 'click': L.ui.createHandlerFn(this, this.onclick || function(ev) { - ev.target.previousElementSibling.value = ev.target.value; + ev.currentTarget.parentNode.nextElementSibling.value = value; return this.map.save(); }) }, [ btn_title ]) -- 2.25.1