From 1b05fb982c032ca22745c3a35c0b54600d977a5a Mon Sep 17 00:00:00 2001 From: ClemDee Date: Mon, 12 Aug 2019 15:26:07 +0200 Subject: [PATCH] Ensure there are not two context submenus opened at the same time --- www/drive/inner.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/drive/inner.js b/www/drive/inner.js index fa90cd2e9..d8885413d 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -481,6 +481,7 @@ define([ var showSubmenu = function () { clearTimeout(timeoutId); $sub.toggleClass("left", $el.offset().left + $el.outerWidth() + $sub.outerWidth() > $(window).width()); + $el.siblings().find(".dropdown-menu").hide(); $sub.show(); }; var hideSubmenu = function () { @@ -488,6 +489,7 @@ define([ $sub.removeClass("left"); }; var mouseOutSubmenu = function () { + // don't hide immediately the submenu timeoutId = setTimeout(hideSubmenu, 100); } // Add submenu expand icon @@ -508,7 +510,6 @@ define([ hideSubmenu(); } else { - $el.siblings().find(".dropdown-menu").hide(); showSubmenu(); } });