From: Nicolas Coden Date: Thu, 19 Jul 2018 21:14:21 +0000 (+0200) Subject: style: improve dropdown hiding event readability in dropdownMenu X-Git-Tag: v6.6.0~3^2~126^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a25180c3d;p=thirdparty%2Ffoundation%2Ffoundation-sites.git style: improve dropdown hiding event readability in dropdownMenu --- diff --git a/js/foundation.dropdownMenu.js b/js/foundation.dropdownMenu.js index 042716fb5..7e5b4e160 100644 --- a/js/foundation.dropdownMenu.js +++ b/js/foundation.dropdownMenu.js @@ -156,13 +156,14 @@ class DropdownMenu extends Plugin { if ($elem.attr('data-is-click') === 'true' && _this.options.clickOpen) { return false; } clearTimeout($elem.data('_delay')); - $elem.data('_delay', setTimeout(function() { + $elem.data('_delay', setTimeout(function () { + // Check for hovering over input dropdown options - if(e.relatedTarget === null && document.hasFocus && document.hasFocus()) { - return false; - } + if (e.relatedTarget === null && document.hasFocus && document.hasFocus()) { return false; } _this._hide($elem); + }, _this.options.closingTime)); + } }); }