Skip to content

Commit de57fdc

Browse files
MartijnWelkermportuga
authored andcommitted
fix(uiGridColumMenu): Add missing promise catch handlers for focus.bySelector calls
1 parent 3085417 commit de57fdc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/js/core/directives/ui-grid-column-menu.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,8 @@ function ($timeout, gridUtil, uiGridConstants, uiGridColumnMenuService, $documen
381381

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

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

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

409411
delete $scope.colElementPosition;

0 commit comments

Comments
 (0)