From: Nicolas Coden Date: Thu, 19 Jul 2018 21:15:25 +0000 (+0200) Subject: docs: improve description of #11410 bug fix in dropdownMenu X-Git-Tag: v6.6.0~3^2~126^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e46ddd1cc;p=thirdparty%2Ffoundation%2Ffoundation-sites.git docs: improve description of #11410 bug fix in dropdownMenu --- diff --git a/js/foundation.dropdownMenu.js b/js/foundation.dropdownMenu.js index 7e5b4e160..354937cbb 100644 --- a/js/foundation.dropdownMenu.js +++ b/js/foundation.dropdownMenu.js @@ -158,8 +158,14 @@ class DropdownMenu extends Plugin { clearTimeout($elem.data('_delay')); $elem.data('_delay', setTimeout(function () { - // Check for hovering over input dropdown options + // Ignore "magic mouseleave": when the mouse simply disapear from the document + // (like when entering in browser input suggestions See https://git.io/zf-11410), + // unless we actually leaved the window (and document lost focus). + // + // In firefox, document will not focus at the time the event is triggered, so we have + // to make this test after the delay. if (e.relatedTarget === null && document.hasFocus && document.hasFocus()) { return false; } + _this._hide($elem); }, _this.options.closingTime));