Skip to content

Commit

Permalink
fix(dropdown): double hide transition breaks upward out
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lubber-de authored Jun 11, 2023
1 parent 41577bc commit cd6c308
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/definitions/modules/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,10 @@
if ($subMenu.length > 0) {
module.verbose('Hiding sub-menu', $subMenu);
$subMenu.each(function () {
module.animate.hide(false, $(this));
var $sub = $(this);
if (!module.is.animating($sub)) {
module.animate.hide(false, $sub);
}
});
}
}
Expand Down

0 comments on commit cd6c308

Please sign in to comment.