luci-base: ui.js: resolve parent ul early in UIDropdown.toggleItem()
authorJo-Philipp Wich <[email protected]>
Fri, 19 Feb 2021 09:39:00 +0000 (10:39 +0100)
committerJo-Philipp Wich <[email protected]>
Mon, 1 Mar 2021 07:55:46 +0000 (08:55 +0100)
commitaf4c851d3571da73bbfc4b93ca83b155bf106720
tree13527eefc733aaceb5179d588d3f717974d39b13
parentd55158730efc9d9bd13a560fd7704924111640f5
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 <[email protected]>
(cherry picked from commit b8d2bcd432ab23a883de1dd4fbce29f9751a6e84)
modules/luci-base/htdocs/luci-static/resources/ui.js