Bug 1067173 - Bail out early if _resizeGrid() is called before the page has loaded f=Mardak r=adw

This commit is contained in:
Tim Taubert 2014-09-20 20:41:18 +02:00
parent 85145c4ecf
commit ed63da4f97

View File

@ -193,6 +193,13 @@ let gGrid = {
* Make sure the correct number of rows and columns are visible
*/
_resizeGrid: function Grid_resizeGrid() {
// If we're somehow called before the page has finished loading,
// let's bail out to avoid caching zero heights and widths.
// We'll be called again when the load event fires.
if (document.readyState != "complete") {
return;
}
// Save the cell's computed height/width including margin and border
if (this._cellMargin === undefined) {
let refCell = document.querySelector(".newtab-cell");