The `onchange` notification handler is called too early to be able to
evaluate other widget's `isActive()` status. Solve this by changing order
of event handling - first register/execute `map.checkDepends` and then
`onchange`.
Fixes: openwrt/luci#4516.
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
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);