Bug 545583 - Don't try to append previews to a non-existent row when using the all-tabs panel's search field. r=mstange

This commit is contained in:
Dão Gottwald 2010-03-06 17:06:04 +01:00
Родитель 990cd7deeb
Коммит 454cbf1f10
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -820,15 +820,18 @@ var allTabs = {
this.container.appendChild(document.createElement("hbox"));
var row = this.container.firstChild;
var i = 0;
var colCount = 0;
previews.forEach(function (preview) {
if (!preview.hidden &&
++colCount > this._columns) {
row = row.nextSibling;
colCount = 1;
}
preview.setAttribute("minwidth", outerWidth);
preview.setAttribute("height", outerHeight);
preview.setAttribute("canvasstyle", canvasStyle);
preview.removeAttribute("closebuttonhover");
row.appendChild(preview);
if (!preview.hidden)
row = this.container.childNodes[Math.floor(++i / this._columns)];
}, this);
this._stack.width = maxWidth;