Skip to content

Commit 136335f

Browse files
Portugal, Marcelomportuga
Portugal, Marcelo
authored andcommitted
fix(menus): Switching applyAsync for timeout.
Reverting my previous change. fix #6533
1 parent 01dee3c commit 136335f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -436,9 +436,9 @@ function ($timeout, gridUtil, uiGridConstants, uiGridColumnMenuService, $documen
436436
$scope.hideMenu();
437437
};
438438

439-
//Since we are hiding this column the default hide action will fail so we need to focus somewhere else.
439+
// Since we are hiding this column the default hide action will fail so we need to focus somewhere else.
440440
var setFocusOnHideColumn = function(){
441-
$scope.$applyAsync(function() {
441+
$timeout(function() {
442442
// Get the UID of the first
443443
var focusToGridMenu = function(){
444444
return gridUtil.focus.byId('grid-menu', $scope.grid);

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ function ($compile, $timeout, $window, $document, gridUtil, uiGridConstants, i18
9393
*/
9494
$scope.shown = true;
9595

96-
$scope.$applyAsync(function() {
96+
// Must be a timeout in order to work properly in Firefox. Issue #6533
97+
$timeout(function() {
9798
$scope.shownMid = true;
9899
$scope.$emit('menu-shown');
99100
});

0 commit comments

Comments
 (0)