From: Marius Olbertz Date: Tue, 10 Oct 2017 16:20:11 +0000 (+0200) Subject: Prevent SPACE from setting focus to the Dropdown if anchor is an input element. X-Git-Tag: v6.6.0~3^2~301^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d736a1de;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Prevent SPACE from setting focus to the Dropdown if anchor is an input element. --- diff --git a/js/foundation.dropdown.js b/js/foundation.dropdown.js index f1da4c541..23d9d075f 100644 --- a/js/foundation.dropdown.js +++ b/js/foundation.dropdown.js @@ -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();