Skip to content

Commit d882087

Browse files
Portugal, MarceloPortugal, Marcelo
Portugal, Marcelo
authored and
Portugal, Marcelo
committed
fix(core): Adding back digest triggers when using $timeout
This reverts commit 7e25a9b. 5895
1 parent 441613f commit d882087

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ function uiGridDirective($compile, $templateCache, $timeout, $window, gridUtil,
241241
sizeChecks++;
242242
}
243243
else {
244-
$timeout(init, 0, false);
244+
$timeout(init);
245245
}
246246
}
247247

src/js/core/factories/Grid.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2244,13 +2244,13 @@ angular.module('ui.grid')
22442244
}
22452245

22462246
p.resolve();
2247-
}, 0, false);
2247+
});
22482248
}
22492249
else {
22502250
// Timeout still needs to be here to trigger digest after styles have been rebuilt
22512251
$timeout(function() {
22522252
p.resolve();
2253-
}, 0, false);
2253+
});
22542254
}
22552255

22562256
return p.promise;

src/js/core/services/ui-grid-util.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ module.service('gridUtil', ['$log', '$window', '$document', '$http', '$templateC
831831
} else {
832832
s.logWarn('[focus.byId] Element id ' + elementID + ' was not found.');
833833
}
834-
}, 0, false);
834+
});
835835
this.queue.push(promise);
836836
return promise;
837837
},
@@ -856,7 +856,7 @@ module.service('gridUtil', ['$log', '$window', '$document', '$http', '$templateC
856856
if (element){
857857
element[0].focus();
858858
}
859-
}, 0, false);
859+
});
860860
this.queue.push(promise);
861861
return promise;
862862
},
@@ -886,8 +886,8 @@ module.service('gridUtil', ['$log', '$window', '$document', '$http', '$templateC
886886
};
887887
this._purgeQueue();
888888
if (aSync){ //Do this asynchronysly
889-
var promise = $timeout(focusBySelector, 0, false);
890-
this.queue.push($timeout(focusBySelector), 0, false);
889+
var promise = $timeout(focusBySelector);
890+
this.queue.push($timeout(focusBySelector));
891891
return promise;
892892
} else {
893893
return focusBySelector();

0 commit comments

Comments
 (0)