When a dropdownMenu is closed by taping on its item, a timeout to open the dropdown on hover after a delay is still set, and the dropdown will reopen.
Changes:
* clean the active item `_delay` when the dropdownMenu is closed
var somethingToClose = $toClose.hasClass('is-active') || $toClose.find('.is-active').length > 0;
if (somethingToClose) {
- $toClose.find('li.is-active').add($toClose).attr({
+ var $activeItem = $toClose.find('li.is-active');
+ $activeItem.add($toClose).attr({
'data-is-click': false
}).removeClass('is-active');
.addClass(`opens-${oldClass}`);
this.changed = false;
}
+
+ clearTimeout($activeItem.data('_delay'));
this._removeBodyHandler();
/**