From ae404b15febf463955490c3544fcf9da975e7857 Mon Sep 17 00:00:00 2001 From: "sspitzer@mozilla.org" Date: Tue, 21 Aug 2007 22:01:28 -0700 Subject: [PATCH] fix for bug #343370. additional scenario where tab scrolling does not handle window resize well. cache the tab strip width and only adjust the tabstrip, scroll and ensure the selected tab is visible if the width changes. r=asaf --- browser/base/content/tabbrowser.xml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 56aee8e0df8..a43df2d97de 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -2414,14 +2414,21 @@ var self = this; function onResize() { - self.adjustTabstrip(false); - self.mTabstrip.scrollBoxObject - .ensureElementIsVisible(self.selectedItem); + var width = self.mTabstrip.boxObject.width; + if (width != self.mTabstripWidth) { + self.adjustTabstrip(false); + self.mTabstrip.scrollByIndex(1); + self.mTabstrip.scrollBoxObject + .ensureElementIsVisible(self.selectedItem); + self.mTabstripWidth = width; + } } window.addEventListener("resize", onResize, false); ]]> + 0 + document.getAnonymousElementByAttribute(this, "anonid", "arrowscrollbox"); @@ -2563,7 +2570,7 @@ - +