diff --git a/src/main/Dropdown.js b/src/main/Dropdown.js index 37091622..9592b830 100644 --- a/src/main/Dropdown.js +++ b/src/main/Dropdown.js @@ -42,6 +42,10 @@ const ATTR_CC = 'data-collision-container'; * @type {string} */ const ATTR_DARKENER = 'data-darkener-container'; +/** + * @type {string} + */ +const ATTR_ENABLE_EVENT_BUBBLE = 'data-enable-event-bubble'; /** * @type {string} */ @@ -127,8 +131,11 @@ class Dropdown { } if (target && !currentOpen) { - e.preventDefault(); - e.stopImmediatePropagation(); + + if (!target.getAttribute(ATTR_ENABLE_EVENT_BUBBLE)) { + e.preventDefault(); + e.stopImmediatePropagation(); + } if (target.isLoading) { return false;