Skip to content

Commit cd6c308

Browse files
authored
fix(dropdown): double hide transition breaks upward out
When a dropdown hides, the transition gets called twice messing up with upward menus and underlaying menu transparency. This is because submenu hiding needs to be called separately (invented by #2331 ) , but in case a select is used the submenu is the dropdown itself, so it should not be (hide) animated again when it is already (hide) animating
1 parent 41577bc commit cd6c308

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/definitions/modules/dropdown.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,10 @@
579579
if ($subMenu.length > 0) {
580580
module.verbose('Hiding sub-menu', $subMenu);
581581
$subMenu.each(function () {
582-
module.animate.hide(false, $(this));
582+
var $sub = $(this);
583+
if (!module.is.animating($sub)) {
584+
module.animate.hide(false, $sub);
585+
}
583586
});
584587
}
585588
}

0 commit comments

Comments
 (0)