Skip to content

Commit

Permalink
fix(uiGridColumMenu): Add missing promise catch handlers for focus.by…
Browse files Browse the repository at this point in the history
…Selector calls
  • Loading branch information
MartijnWelker authored and mportuga committed Dec 19, 2018
1 parent 3085417 commit de57fdc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/js/core/directives/ui-grid-column-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@ function ($timeout, gridUtil, uiGridConstants, uiGridColumnMenuService, $documen

if ($scope.col && $scope.col.visible) {
// Focus on the menu button
gridUtil.focus.bySelector($document, '.ui-grid-header-cell.' + $scope.col.getColClass()+ ' .ui-grid-column-menu-button', $scope.col.grid, false);
gridUtil.focus.bySelector($document, '.ui-grid-header-cell.' + $scope.col.getColClass()+ ' .ui-grid-column-menu-button', $scope.col.grid, false)
.catch(angular.noop);
}
}

Expand All @@ -403,7 +404,8 @@ function ($timeout, gridUtil, uiGridConstants, uiGridColumnMenuService, $documen

// automatically set the focus to the first button element in the now open menu.
if (hasVisibleMenuItems) {
gridUtil.focus.bySelector($document, '.ui-grid-menu-items .ui-grid-menu-item:not(.ng-hide)', true);
gridUtil.focus.bySelector($document, '.ui-grid-menu-items .ui-grid-menu-item:not(.ng-hide)', true)
.catch(angular.noop);
}

delete $scope.colElementPosition;
Expand Down

0 comments on commit de57fdc

Please sign in to comment.