fixed treeview selection

pull/2256/head
REJack 2019-09-19 09:57:49 +02:00
parent 91840e0231
commit 40d88ee12e
No known key found for this signature in database
GPG Key ID: 9F3976CC630CC888
1 changed files with 7 additions and 2 deletions

View File

@ -89,10 +89,15 @@ const Treeview = (($) => {
toggle(event) {
const $relativeTarget = $(event.currentTarget)
let treeviewMenu = $relativeTarget.parent().find(Selector.TREEVIEW_MENU)
const $parent = $relativeTarget.parent()
let treeviewMenu = $parent.find(Selector.TREEVIEW_MENU)
if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {
treeviewMenu = $relativeTarget.parent().parent().find(Selector.TREEVIEW_MENU)
if (!$parent.is(Selector.LI)) {
treeviewMenu = $parent.parent().find(Selector.TREEVIEW_MENU)
}
if (!treeviewMenu.is(Selector.TREEVIEW_MENU)) {
return