From 1f831db14e69123f52d0599e000106907e85b4ab Mon Sep 17 00:00:00 2001 From: "mozilla.mano%sent.com" Date: Tue, 24 Oct 2006 23:27:44 +0000 Subject: [PATCH] Bug 355469 - Show Passwords dialog does not resize correctly. r=mconnor. --- toolkit/content/widgets/preferences.xml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/toolkit/content/widgets/preferences.xml b/toolkit/content/widgets/preferences.xml index 2563ef1f760e..75002e0b4cb3 100644 --- a/toolkit/content/widgets/preferences.xml +++ b/toolkit/content/widgets/preferences.xml @@ -734,21 +734,20 @@ this._paneDeck.setAttribute("selectedIndex", i); if (this.type != "child") { - // Don't let the new pane content flex to the current window - // height if we're animating - if (this._shouldAnimate) - aPaneElement.removeAttribute("flex"); - var oldPane = this.lastSelected ? document.getElementById(this.lastSelected) : this.preferencePanes[0]; oldPane.selected = !(aPaneElement.selected = true); - if (!this._initialized || oldPane.id != aPaneElement.id) { - this.lastSelected = aPaneElement.id; - this.currentPane = aPaneElement; - if (this._shouldAnimate) { - aPaneElement.style.opacity = 0.0; - this.animate(oldPane, aPaneElement); - } - this._initialized = true; + this.lastSelected = aPaneElement.id; + this.currentPane = aPaneElement; + this._initialized = true; + + // Only animate if we've switched between prefpanes + if (this._shouldAnimate && oldPane.id != aPaneElement.id) { + // Don't let the new pane content flex to the current window + // height if we're animating + aPaneElement.removeAttribute("flex"); + + aPaneElement.style.opacity = 0.0; + this.animate(oldPane, aPaneElement); } } break;