From 9044bf9f9aab00bb74baa501f1bd9df8cfe08fce Mon Sep 17 00:00:00 2001 From: Kevin Ball Date: Fri, 9 Sep 2016 15:16:07 -0700 Subject: [PATCH] Fix mouseenter issue with touch devices --- js/foundation.dropdown.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/js/foundation.dropdown.js b/js/foundation.dropdown.js index 280b7be36..ec89f3b2e 100644 --- a/js/foundation.dropdown.js +++ b/js/foundation.dropdown.js @@ -169,12 +169,14 @@ class Dropdown { if(this.options.hover){ this.$anchor.off('mouseenter.zf.dropdown mouseleave.zf.dropdown') - .on('mouseenter.zf.dropdown', function(){ - clearTimeout(_this.timeout); - _this.timeout = setTimeout(function(){ - _this.open(); - _this.$anchor.data('hover', true); - }, _this.options.hoverDelay); + .on('mouseenter.zf.dropdown', function(){ + if($('body[data-whatinput="mouse"]').is('*')) { + clearTimeout(_this.timeout); + _this.timeout = setTimeout(function(){ + _this.open(); + _this.$anchor.data('hover', true); + }, _this.options.hoverDelay); + } }).on('mouseleave.zf.dropdown', function(){ clearTimeout(_this.timeout); _this.timeout = setTimeout(function(){ -- 2.47.2