Merge "vector.js: Use idle callback (not rAF) for computed style read"
This commit is contained in:
commit
b5b5b3c5e3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue