Merge pull request #4531 from oldium/add-widget-changed
authorJo-Philipp Wich <jo@mein.io>
Fri, 30 Oct 2020 20:29:38 +0000 (21:29 +0100)
committerGitHub <noreply@github.com>
Fri, 30 Oct 2020 20:29:38 +0000 (21:29 +0100)
luci-base: Fix using isActive in widget-change notification.

modules/luci-base/htdocs/luci-static/resources/form.js

index 612c8ff94423ab5ce92ff9e22ee54fff21e69829..70f156c721c991763e272ccfd15346718cfee825 100644 (file)
@@ -3351,10 +3351,10 @@ var CBIValue = CBIAbstractValue.extend(/** @lends LuCI.form.Value.prototype */ {
                        optionEl.classList.add('hidden');
 
                optionEl.addEventListener('widget-change',
-                       L.bind(this.handleValueChange, this, section_id, {}));
+                       L.bind(this.map.checkDepends, this.map));
 
                optionEl.addEventListener('widget-change',
-                       L.bind(this.map.checkDepends, this.map));
+                       L.bind(this.handleValueChange, this, section_id, {}));
 
                dom.bindClassInstance(optionEl, this);