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 10:32:25 +0000 (11:32 +0100)
commitc33df8f75c98aee66f7dfec58e4a8efbfb4651ec
treed0f8e2befb75ad66e84966c8e7131cfc33a09196
parente67fe6d00a7f9547ea10365ecfebe5100d465c71
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>
(cherry picked from commit b8d2bcd432ab23a883de1dd4fbce29f9751a6e84)
modules/luci-base/htdocs/luci-static/resources/ui.js