Repro: https://output.jsbin.com/sobaje 1. Middle-click then drag. 2. Right-click, then right-click-and-drag outside the context menu. In each case, event.button should always be 0 (even though buttons is set correctly). https://www.w3.org/TR/uievents/#event-type-mousemove
FF follows the spec.
So does IE
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bafc23e1920cc799c03159c39e29878e26071db0 commit bafc23e1920cc799c03159c39e29878e26071db0 Author: dtapuska <dtapuska@chromium.org> Date: Wed Apr 26 22:37:26 2017 Fix button event on mouse events. Button is supposed to be uninitialized on events that are mousemove,leave,enter,over and out. This matches FF and Edge. BUG= 650704 Review-Url: https://codereview.chromium.org/2840023002 Cr-Commit-Position: refs/heads/master@{#467486} [add] https://crrev.com/bafc23e1920cc799c03159c39e29878e26071db0/third_party/WebKit/LayoutTests/external/wpt/uievents/mouse/mouseevent_move_button-manual.html [modify] https://crrev.com/bafc23e1920cc799c03159c39e29878e26071db0/third_party/WebKit/LayoutTests/external/wpt_automation/pointerevents/pointerevent_common_input.js [add] https://crrev.com/bafc23e1920cc799c03159c39e29878e26071db0/third_party/WebKit/LayoutTests/external/wpt_automation/uievents/mouse/mouseevent_move_button-manual-automation.js [modify] https://crrev.com/bafc23e1920cc799c03159c39e29878e26071db0/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-chorded-buttons.html [modify] https://crrev.com/bafc23e1920cc799c03159c39e29878e26071db0/third_party/WebKit/Source/core/events/MouseEvent.cpp [modify] https://crrev.com/bafc23e1920cc799c03159c39e29878e26071db0/third_party/WebKit/Source/core/events/MouseEvent.h
Comment 1 by mustaq@chromium.org
, Sep 27 2016