Bug 689494 - Don't resize the UI when dragging the tablet sidebar rightward [r=mbrubeck]
authorVivien Nicolas <21@vingtetun.org>
Wed, 28 Sep 2011 17:29:29 -0700
changeset 77792 0ae3e1279d98493b4b4b644e26360dabc7443e34
parent 77791 7cc26b83a57c5d6386128830116438ecf522596f
child 77793 f3108f5bd0752fa2b8610c4f01a4827c786a1786
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersmbrubeck
bugs689494
milestone10.0a1
Bug 689494 - Don't resize the UI when dragging the tablet sidebar rightward [r=mbrubeck]
mobile/chrome/content/tabs.xml
--- a/mobile/chrome/content/tabs.xml
+++ b/mobile/chrome/content/tabs.xml
@@ -201,17 +201,19 @@
 
             dragStop: function dragStop(dx, dy) {
               if (this._grabSidebar)
                 Browser.ungrabSidebar();
               dragger.dragStop(dx, dy, scroller);
             },
 
             dragMove: function dragMove(dx, dy) {
-              if (!this._grabSidebar) {
+              let ltr = (Util.localeDir == Util.LOCALE_DIR_LTR);
+              let hiddingPan = ltr ? (dx > 0) : (dx < 0);
+              if (!this._grabSidebar && hiddingPan) {
                 this._grabSidebar = dx && Util.isTablet() && !Util.isPortrait();
                 if (this._grabSidebar)
                   Browser.grabSidebar();
               }
               if (this._grabSidebar)
                 Browser.slideSidebarBy(dx);
               return dragger.dragMove(dx, dy, scroller);
             }