From 51d1a1a523b4ced235c48524da14d3928a727b7e Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Fri, 30 Sep 2011 15:02:16 -0700 Subject: [PATCH] Bug 690739 (1/2) - [TabletUI] Make the swipable sidebar margin smaller when the sidebar is closed [r=mfinkle] --- mobile/chrome/content/browser.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mobile/chrome/content/browser.js b/mobile/chrome/content/browser.js index e55e81b3387e..d11ae60c0540 100644 --- a/mobile/chrome/content/browser.js +++ b/mobile/chrome/content/browser.js @@ -1356,11 +1356,14 @@ Browser.MainDragger.prototype = { let isTablet = Util.isTablet(); this._panToolbars = !isTablet; + this._grabSidebar = false; // In landscape portrait mode, swiping from the left margin drags the tab sidebar. - this._grabSidebar = isTablet && !Util.isPortrait() && - ((Util.localeDir == Util.LOCALE_DIR_LTR) ? - (clientX - bcr.left < 30) : - (bcr.right - clientX < 30)); + if (isTablet && !Util.isPortrait()) { + let grabSidebarMargin = TabsPopup.visible ? 30 : 5; + this._grabSidebar = ((Util.localeDir == Util.LOCALE_DIR_LTR) + ? (clientX - bcr.left < 30) + : (bcr.right - clientX < 30)); + } if (this._grabSidebar) Browser.grabSidebar();