From 209075b5047dcdf663db51ba99250344dd21b462 Mon Sep 17 00:00:00 2001 From: REJack Date: Mon, 21 Sep 2020 09:28:14 +0200 Subject: [PATCH] fix mulitple level dropdown-menu overlapping --- build/js/Dropdown.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/js/Dropdown.js b/build/js/Dropdown.js index 0bf29f2a0..072163b9d 100644 --- a/build/js/Dropdown.js +++ b/build/js/Dropdown.js @@ -22,6 +22,7 @@ const SELECTOR_DROPDOWN_MENU_ACTIVE = '.dropdown-menu.show' const SELECTOR_DROPDOWN_TOGGLE = '[data-toggle="dropdown"]' const CLASS_NAME_DROPDOWN_RIGHT = 'dropdown-menu-right' +const CLASS_NAME_DROPDOWN_SUBMENU = 'dropdown-submenu' // TODO: this is unused; should be removed along with the extend? const Default = { @@ -122,6 +123,10 @@ $(`${SELECTOR_DROPDOWN_MENU} ${SELECTOR_DROPDOWN_TOGGLE}`).on('click', function $(`${SELECTOR_NAVBAR} ${SELECTOR_DROPDOWN_TOGGLE}`).on('click', event => { event.preventDefault() + if ($(event.target).parent().hasClass(CLASS_NAME_DROPDOWN_SUBMENU)) { + return + } + setTimeout(function () { Dropdown._jQueryInterface.call($(this), 'fixPosition') }, 1)