From a25180c3dc37e53db0520af8a057675089a1dbf2 Mon Sep 17 00:00:00 2001 From: Nicolas Coden Date: Thu, 19 Jul 2018 23:14:21 +0200 Subject: [PATCH] style: improve dropdown hiding event readability in dropdownMenu --- js/foundation.dropdownMenu.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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)); + } }); } -- 2.47.2