From cd6c30873c581b83b57681cac7c38564dd1fd75e Mon Sep 17 00:00:00 2001 From: Marco 'Lubber' Wienkoop Date: Sun, 11 Jun 2023 21:05:08 +0200 Subject: [PATCH] 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 --- src/definitions/modules/dropdown.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index db02d6a915..67554ee120 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -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); + } }); } }