Skip to content

Commit 8961823

Browse files
committed
Use requestAnimationFrame instead of $timeout
1 parent fd22168 commit 8961823

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/views/listview/list-view-directive.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@
419419
</file>
420420
</example>
421421
*/
422-
angular.module('patternfly.views').directive('pfListView', function ($timeout, $window, pfUtils) {
422+
angular.module('patternfly.views').directive('pfListView', function ($window, pfUtils) {
423423
'use strict';
424424
return {
425425
restrict: 'A',
@@ -545,7 +545,7 @@ angular.module('patternfly.views').directive('pfListView', function ($timeout, $
545545
// update the actions based on the current item
546546
$scope.updateActions(item);
547547

548-
$timeout(function () {
548+
$window.requestAnimationFrame(function () {
549549
var parentDiv = undefined;
550550
var nextElement;
551551

@@ -559,7 +559,7 @@ angular.module('patternfly.views').directive('pfListView', function ($timeout, $
559559
}
560560
nextElement = nextElement.parentElement;
561561
}
562-
}, 100);
562+
});
563563
};
564564
},
565565

0 commit comments

Comments
 (0)