diff --git a/vector.js b/vector.js index bf9262326..375581d68 100644 --- a/vector.js +++ b/vector.js @@ -9,7 +9,6 @@ $( function () { */ var $cactions = $( '#p-cactions' ), $tabContainer = $( '#p-views ul' ), - rAF = window.requestAnimationFrame || setTimeout, // Avoid forced style calculation during page load initialCactionsWidth = function () { var width = $cactions.width(); @@ -19,7 +18,7 @@ $( function () { return width; }; - rAF( initialCactionsWidth ); + mw.requestIdleCallback( initialCactionsWidth ); /** * Focus search input at the very end