Bug 688800 - [tablet] UI jumps when tapping in the tab sidebar [r=mfinkle]
authorMatt Brubeck <mbrubeck@mozilla.com>
Fri, 23 Sep 2011 11:07:43 -0700
changeset 77428 b1f9800647c7446ce832bfbadf54c87e5e3c75ca
parent 77427 6723975148ada5e131dcde33b8ed59c1d24aa50b
child 77429 27ea88e0c870fb16eb75725aeeb8819bbca7d49c
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersmfinkle
bugs688800
milestone9.0a1
Bug 688800 - [tablet] UI jumps when tapping in the tab sidebar [r=mfinkle]
mobile/chrome/content/tabs.xml
--- a/mobile/chrome/content/tabs.xml
+++ b/mobile/chrome/content/tabs.xml
@@ -190,29 +190,32 @@
           scrollbox.customDragger = {
             _grabSidebar: false,
 
             isDraggable: function isDraggable(target, content) {
               return { x: true, y: true };
             },
 
             dragStart: function dragStart(cx, cy, target) {
-              this._grabSidebar = Util.isTablet() && !Util.isPortrait();
-              if (this._grabSidebar)
-                Browser.grabSidebar();
+              this._grabSidebar = false;
               dragger.dragStart(cx, cy, target, scroller);
             },
 
             dragStop: function dragStop(dx, dy) {
               if (this._grabSidebar)
                 Browser.ungrabSidebar();
               dragger.dragStop(dx, dy, scroller);
             },
 
             dragMove: function dragMove(dx, dy) {
+              if (!this._grabSidebar) {
+                this._grabSidebar = dx && Util.isTablet() && !Util.isPortrait();
+                if (this._grabSidebar)
+                  Browser.grabSidebar();
+              }
               if (this._grabSidebar)
                 Browser.slideSidebarBy(dx);
               return dragger.dragMove(dx, dy, scroller);
             }
           };
         ]]>
       </constructor>