Fixed issue with multilevel dropdowns not closing properly in some scenarios (fixes #863)

This commit is contained in:
Djamil Legato
2015-09-22 12:11:41 -07:00
parent 5b35a7bd25
commit f6f0bf92a7
3 changed files with 11 additions and 2 deletions
+5 -1
View File
@@ -197,7 +197,11 @@ var Menu = new prime({
roots = topLevel.search(' >' + selectors.item);
if (roots) { roots.removeClass(states.selected); }
if (topLevel) { this.closeDropdown(topLevel); }
if (topLevel) {
var allRoots = topLevel.search('> ' + this.options.selectors.item);
if (allRoots) { allRoots.forEach(this.closeDropdown.bind(this)); }
this.closeDropdown(topLevel);
}
this.toggleOverlay(topLevel);
},