Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(handleMenuItemHover): allow any mdButton to be a focusableTarget
Browse files Browse the repository at this point in the history
Allow any mdButton element (`<button>` or `<a>` tag) to take focus when it is hovered over.
Previously, only a non-disabled button could be a focusable target when being hovered over.
Now, any non-disabled element with the md-button class can be a focusable target and take focus.

This fix closes issue #7220.

  Closes #7221
  • Loading branch information
snaumets authored and ThomasBurleson committed Feb 26, 2016
1 parent 35de3d1 commit 0fa96d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/menu/js/menuController.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function MenuController($mdMenu, $attrs, $element, $scope, $mdUtil, $timeout, $r
nestedMenu.open();
}
}, nestedMenu ? 100 : 250);
var focusableTarget = event.currentTarget.querySelector('button:not([disabled])');
var focusableTarget = event.currentTarget.querySelector('.md-button:not([disabled])');
focusableTarget && focusableTarget.focus();
};

Expand Down

0 comments on commit 0fa96d5

Please sign in to comment.