]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Prevent SPACE from setting focus to the Dropdown if anchor is an input element.
authorMarius Olbertz <marius.olbertz@gmail.com>
Tue, 10 Oct 2017 16:20:11 +0000 (18:20 +0200)
committerMarius Olbertz <marius.olbertz@gmail.com>
Tue, 10 Oct 2017 16:20:11 +0000 (18:20 +0200)
js/foundation.dropdown.js

index f1da4c5411199121b7ce76f21124ca55172e1560..23d9d075f23a7680ca42e0bfe94ae4a01ebbe84a 100644 (file)
@@ -178,7 +178,7 @@ class Dropdown extends Positionable {
 
       Keyboard.handleKey(e, 'Dropdown', {
         open: function() {
-          if ($target.is(_this.$anchors)) {
+          if ($target.is(_this.$anchors) && !$target.is('input')) {
             _this.open();
             _this.$element.attr('tabindex', -1).focus();
             e.preventDefault();