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

Commit 0fa96d5

Browse files
snaumetsThomasBurleson
authored andcommitted
fix(handleMenuItemHover): allow any mdButton to be a focusableTarget
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
1 parent 35de3d1 commit 0fa96d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/menu/js/menuController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function MenuController($mdMenu, $attrs, $element, $scope, $mdUtil, $timeout, $r
9292
nestedMenu.open();
9393
}
9494
}, nestedMenu ? 100 : 250);
95-
var focusableTarget = event.currentTarget.querySelector('button:not([disabled])');
95+
var focusableTarget = event.currentTarget.querySelector('.md-button:not([disabled])');
9696
focusableTarget && focusableTarget.focus();
9797
};
9898

0 commit comments

Comments
 (0)