summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-02-14 08:43:28 +0100
committerJo-Philipp Wich <jo@mein.io>2020-02-14 08:43:28 +0100
commit9ae1f478960f9587e8123e61e1a2221e866da26b (patch)
tree76fc5825ddbeae8b289e7de969d881d475a2ad01 /modules/luci-base/htdocs
parent5258080ce32b973e80111abd41fec82bf9b5e31e (diff)
luci-base: cbi.js: avoid double-initialization of dropdowns
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/cbi.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js
index 2dba54750d..92c41515fb 100644
--- a/modules/luci-base/htdocs/luci-static/resources/cbi.js
+++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js
@@ -731,6 +731,9 @@ if (typeof(window.CustomEvent) !== 'function') {
}
function cbi_dropdown_init(sb) {
+ if (sb && L.dom.findClassInstance(sb) instanceof L.ui.Dropdown)
+ return;
+
var dl = new L.ui.Dropdown(sb, null, { name: sb.getAttribute('name') });
return dl.bind(sb);
}