]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Don't listen to touchend events on dropdown element leafs. 9546/head
authorAlberto Fernandez <sinspiral@gmail.com>
Wed, 21 Dec 2016 22:47:15 +0000 (17:47 -0500)
committerAlberto Fernandez <sinspiral@gmail.com>
Wed, 21 Dec 2016 22:49:24 +0000 (17:49 -0500)
The delay on touch devices between the click and touchend event
was preventing the link navigation, as browser security policies
don't allow link navigation on hidden elements.

fixes #9484

js/foundation.dropdownMenu.js

index 2fdc59a4dff997a1e57e6f6b8e6a940f58f07166..65c1987431e4707985ed445a09cb805202277415 100644 (file)
@@ -104,7 +104,7 @@ class DropdownMenu {
 
     // Handle Leaf element Clicks
     if(_this.options.closeOnClickInside){
-      this.$menuItems.on('click.zf.dropdownmenu touchend.zf.dropdownmenu', function(e) {
+      this.$menuItems.on('click.zf.dropdownmenu', function(e) {
         var $elem = $(this),
             hasSub = $elem.hasClass(parClass);
         if(!hasSub){