Bug 201496 - MouseEvent.button should be 0 for mousemove events
Summary: MouseEvent.button should be 0 for mousemove events
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-09-05 00:08 PDT by Fujii Hironori
Modified: 2019-09-09 06:34 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2019-09-05 00:08:04 PDT
MouseEvent.button should be 0 for mousemove events

Spec: https://www.w3.org/TR/uievents/#dom-mouseevent-button

> The value of button is not updated for events not caused by the
> depression/release of a mouse button. In these scenarios, take
> care not to interpret the value 0 as the left button, but rather
> as the un-initialized value.

test case 1: attachment 377952 [details]
test case 2: https://jsfiddle.net/fujihiro/vy7hkpLw/10/embedded/result

Firefox and Chrome set it 0 for mousemove events.
Comment 1 Alexey Proskuryakov 2019-09-07 12:40:15 PDT
This seems to work in Safari. Is this a Windows port bug report?
Comment 2 Fujii Hironori 2019-09-08 20:55:19 PDT
This is a test procedure:

1. Open attachment 377952 [details]
2. Hold the mouse middle button pressing
3. Move the mouse

button should be 0, but 1.

I tested with Safari Technology Preview 91 and Safari 12.1.2.
Comment 3 Radar WebKit Bug Importer 2019-09-09 06:34:47 PDT
<rdar://problem/55180368>