Bug 662302 - Droid Pro: Unable to pan back to content window with 3 columns of tabs open [r=vingtetun]

This commit is contained in:
Mark Finkle 2011-06-22 15:46:42 -04:00
parent c5f7f0a955
commit 49a7ea7d95

View File

@ -242,6 +242,11 @@
if (this._columnsCount != columnsCount && window.innerWidth > 1) { // > 1 to ignore column resizing while the main window is loading
let width = columnsCount * (COLUMN_MARGIN + firstBox.width);
this.children.style.width = width + "px";
// Clamp the sidebar width so it won't overflow the window. Only clamp
// the scrollbox. The children need to be the full width.
if (width > window.innerWidth - firstBox.width)
width = window.innerWidth - firstBox.width;
this._scrollbox.style.width = width + "px";
this._columnsCount = columnsCount;
}