From d194e04481ad61566e138eb5f90d35bff10c51fc Mon Sep 17 00:00:00 2001 From: Oleg Romashin Date: Thu, 9 Oct 2008 22:01:18 -0500 Subject: [PATCH] Bug 455113 - Tabbar and control-bar should not show/hide with the same drag event. Missing changes. r=mark.finkle. --- mobile/chrome/content/browser-ui.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mobile/chrome/content/browser-ui.js b/mobile/chrome/content/browser-ui.js index 2fad69bced7..faff5cfe67d 100644 --- a/mobile/chrome/content/browser-ui.js +++ b/mobile/chrome/content/browser-ui.js @@ -290,18 +290,23 @@ var BrowserUI = { newLeft = -(tabbarW + sidebarW); // Set the UI mode based on where we ended up + var noneMode = (gContentBox.style.marginTop == "0px" ? UIMODE_NONE : UIMODE_URLVIEW); if (newLeft > -(tabbarW - tabbarW / 3) && newLeft <= 0) { - if (this._dragData.uiMode == UIMODE_CONTROLS) + if (this._dragData.uiMode == UIMODE_CONTROLS) { + this.mode = noneMode; return; + } this.mode = UIMODE_TABS; } else if (newLeft >= -(tabbarW + sidebarW) && newLeft < -(tabbarW + sidebarW / 3)) { - if (this._dragData.uiMode == UIMODE_TABS) + if (this._dragData.uiMode == UIMODE_TABS) { + this.mode = noneMode; return; + } this.mode = UIMODE_CONTROLS; } else - this.mode = (gContentBox.style.marginTop == "0px" ? UIMODE_NONE : UIMODE_URLVIEW); + this.mode = noneMode; tabbar.left = newLeft;