From: Marius Olbertz Date: Thu, 12 Jan 2017 07:11:26 +0000 (+0100) Subject: Prevent keyboard trap in drilldown menu. X-Git-Tag: v6.3.1-rc1~9^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9634%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Prevent keyboard trap in drilldown menu. Added check if current element is first/last element in root ul of drilldown. Only prevents default if this is not the case now. Fixes #9597 --- diff --git a/js/foundation.drilldown.js b/js/foundation.drilldown.js index 3b7802d69..53673bcca 100644 --- a/js/foundation.drilldown.js +++ b/js/foundation.drilldown.js @@ -227,11 +227,13 @@ class Drilldown { }, up: function() { $prevElement.focus(); - return true; + // Don't tap focus on first element in root ul + return !$element.is(_this.$element.find('> li:first-child > a')); }, down: function() { $nextElement.focus(); - return true; + // Don't tap focus on last element in root ul + return !$element.is(_this.$element.find('> li:last-child > a')); }, close: function() { _this._back();