Skip to content

Commit

Permalink
fix(ui-grid-column-menu.js): Focus on first item in column menu on open.
Browse files Browse the repository at this point in the history
Keyboard navigation fix suggested by @ShibyNiju

fix #6482
  • Loading branch information
Portugal, Marcelo authored and mportuga committed Mar 21, 2018
1 parent f77a5b3 commit 43b313f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/core/directives/ui-grid-column-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ function ($timeout, gridUtil, uiGridConstants, uiGridColumnMenuService, $documen
uiGridColumnMenuService.repositionMenu( $scope, $scope.col, $scope.colElementPosition, $elm, $scope.colElement );

//automatically set the focus to the first button element in the now open menu.
gridUtil.focus.bySelector($document, '.ui-grid-menu-items .ui-grid-menu-item', true);
gridUtil.focus.bySelector($document, '.ui-grid-menu-items .ui-grid-menu-item:not(.ng-hide)', true);
delete $scope.colElementPosition;
delete $scope.columnElement;
});
Expand Down

0 comments on commit 43b313f

Please sign in to comment.