From c8239193a1c048bb91d2d744a59a1d1ee3ac4b96 Mon Sep 17 00:00:00 2001 From: Marius Olbertz Date: Thu, 12 Jan 2017 08:11:26 +0100 Subject: [PATCH] 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 --- js/foundation.drilldown.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); -- 2.47.2