luci-base: ui.js: resolve parent ul early in UIDropdown.toggleItem()
authorJo-Philipp Wich <jo@mein.io>
Fri, 19 Feb 2021 09:39:00 +0000 (10:39 +0100)
committerJo-Philipp Wich <jo@mein.io>
Fri, 19 Feb 2021 09:41:00 +0000 (10:41 +0100)
commitb8d2bcd432ab23a883de1dd4fbce29f9751a6e84
treefa03c516afcd3a8adee70aa5d4b3ade204142b1c
parentfa20ad41c10e3d218fc9fa5cb57f5129bed390d2
luci-base: ui.js: resolve parent ul early in UIDropdown.toggleItem()

The parent node of the current li might be null after collapsing the
dropdown, so resolve the parent ul early to avoid passing null to
subsequent calls.

Fixes clearing custom input values in DynamicList dropdowns.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/ui.js