Bug 768846 - Resize issues in Responsive mode with Toolbox open. r=vporof
authorPaul Rouget <paul@mozilla.com>
Thu, 13 Dec 2012 12:26:42 +0200
changeset 115919 f7ead5ca7000
parent 115918 4eb861243857
child 115920 c91811dc01ba
push id24033
push userjwalker@mozilla.com
push dateFri, 14 Dec 2012 09:50:41 +0000
treeherdermozilla-central@8a30e07815ff [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvporof
bugs768846
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 768846 - Resize issues in Responsive mode with Toolbox open. r=vporof
browser/devtools/responsivedesign/responsivedesign.jsm
--- a/browser/devtools/responsivedesign/responsivedesign.jsm
+++ b/browser/devtools/responsivedesign/responsivedesign.jsm
@@ -603,49 +603,49 @@ ResponsiveUI.prototype = {
     }
     this.mainWindow.addEventListener("mouseup", this.bound_stopResizing, true);
     this.mainWindow.addEventListener("mousemove", this.bound_onDrag, true);
     this.container.style.pointerEvents = "none";
 
     this._resizing = true;
     this.stack.setAttribute("notransition", "true");
 
-    this.lastClientX = aEvent.clientX;
-    this.lastClientY = aEvent.clientY;
+    this.lastScreenX = aEvent.screenX;
+    this.lastScreenY = aEvent.screenY;
 
     this.ignoreY = (aEvent.target === this.resizeBar);
 
     this.isResizing = true;
   },
 
   /**
    * Resizing on mouse move.
    *
    * @param aEvent
    */
   onDrag: function RUI_onDrag(aEvent) {
-    let deltaX = aEvent.clientX - this.lastClientX;
-    let deltaY = aEvent.clientY - this.lastClientY;
+    let deltaX = aEvent.screenX - this.lastScreenX;
+    let deltaY = aEvent.screenY - this.lastScreenY;
 
     if (this.ignoreY)
       deltaY = 0;
 
     let width = this.customPreset.width + deltaX;
     let height = this.customPreset.height + deltaY;
 
     if (width < MIN_WIDTH) {
         width = MIN_WIDTH;
     } else {
-        this.lastClientX = aEvent.clientX;
+        this.lastScreenX = aEvent.screenX;
     }
 
     if (height < MIN_HEIGHT) {
         height = MIN_HEIGHT;
     } else {
-        this.lastClientY = aEvent.clientY;
+        this.lastScreenY = aEvent.screenY;
     }
 
     this.setSize(width, height);
   },
 
   /**
    * Stop End resizing
    */