Skip to content

Commit

Permalink
Merge pull request #9635 from Owlbertz/drilldown-esc-bug
Browse files Browse the repository at this point in the history
Fixed ESC button on drilldown menus.
  • Loading branch information
kball authored Jan 12, 2017
2 parents b2e2f19 + a57345c commit baa80fb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/foundation.drilldown.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,11 @@ class Drilldown {
return !$element.is(_this.$element.find('> li:last-child > a'));
},
close: function() {
_this._back();
//_this.$menuItems.first().focus(); // focus to first element
// Don't close on element in root ul
if (!$element.is(_this.$element.find('> li > a'))) {
_this._hide($element.parent().parent());
$element.parent().parent().siblings('a').focus();
}
},
open: function() {
if (!$element.is(_this.$menuItems)) { // not menu item means back button
Expand Down

0 comments on commit baa80fb

Please sign in to comment.