From f6e363000ba336a64631b6f132f7b6b827f67233 Mon Sep 17 00:00:00 2001 From: "sspitzer%mozilla.org" Date: Mon, 3 Jul 2006 06:46:48 +0000 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 git-svn-id: svn://10.0.0.236/trunk@201479 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/toolkit/content/widgets/tabbrowser.xml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/mozilla/toolkit/content/widgets/tabbrowser.xml b/mozilla/toolkit/content/widgets/tabbrowser.xml index 56aee8e0df8..a43df2d97de 100644 --- a/mozilla/toolkit/content/widgets/tabbrowser.xml +++ b/mozilla/toolkit/content/widgets/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 @@ - +