title: Strange behaviour of MouseEvent.movementX & Y on Windows (Mac OS works fine)
body: <p>I've created a sample code demonstrating how e.movementX &amp; e.movementY are behaving in different ways on Windows and Mac OS. I assume that movementX &amp; Y should follow perfectly the mouse movement in this sample (as happens in Mac OS).</p>
  <p>How the sample works:</p>
  <ul>
  <li>mouse movement sets the circle top &amp; left to clientY &amp; clientX</li>
  <li>if mouse button is pressed then it relies on movementX &amp; movementY</li>
  </ul>
  <p><a href="https://codepen.io/wagnerpaz/pen/jOygvQP?editors=1111" rel="nofollow noreferrer">https://codepen.io/wagnerpaz/pen/jOygvQP?editors=1111</a></p>
  <pre><code>&lt;html&gt;
    &lt;body&gt;
      &lt;div id=&quot;circle&quot;/&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <pre><code>#circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    border-radius: 50px;
    background-color: red;
  }
  </code></pre>
  <pre><code>let pressed = false;
  
  document.addEventListener(&quot;mousedown&quot;, function(e) {
    pressed = true;
  });
  
  document.addEventListener(&quot;mouseup&quot;, function(e) {
    pressed = false;
  });
  
  document.addEventListener(&quot;mousemove&quot;, function(e) {
    const circle = document.getElementById('circle');
    if(!pressed) {
      circle.style.top = e.clientY - 25 + 'px';
      circle.style.left = e.clientX - 25 + 'px';
    }
    else {
      const currentTop = parseInt(circle.style.top.replace('px', ''));
      const currentLeft = parseInt(circle.style.left.replace('px', ''));
      circle.style.top = currentTop + e.movementY + 'px';
      circle.style.left = currentLeft + e.movementX + 'px';
    }
  });
  </code></pre>
  <p>How can I make Windows follow mouse movement perfectly like Mac OS does?</p>