Skip to content

Commit

Permalink
fix(uiGridColumMenu): Check column visibility before trying to focus …
Browse files Browse the repository at this point in the history
…it in the menu-hidden callback
  • Loading branch information
MartijnWelker authored and mportuga committed Dec 19, 2018
1 parent a537f0c commit 3a8e87b
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 @@ -379,7 +379,7 @@ function ($timeout, gridUtil, uiGridConstants, uiGridColumnMenuService, $documen
} else {
$scope.hideMenu( true );

if ($scope.col) {
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);
}
Expand Down

0 comments on commit 3a8e87b

Please sign in to comment.