Bug 81855 - DOM 3 Event, Implement MouseEvent buttons member
Summary: DOM 3 Event, Implement MouseEvent buttons member
Status: RESOLVED DUPLICATE of bug 178214
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://dev.w3.org/2006/webapi/DOM-Lev...
Depends on:
Reported: 2012-03-21 18:04 PDT by Brandon Andrews
Modified: 2019-09-03 20:07 PDT (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Brandon Andrews 2012-03-21 18:04:35 PDT
This has been around forever and solves almost every problem in regards to standardizing mouse event buttons. Either it needs some more discussion or needs to be implemented. Especially with the pointer lock specification being put through so quickly having a standard mouse button interface will be important and "buttons" does just that. It's the IE bitflags such that each button on the mouse (defined for 1-5 buttons currently) has a unique bit flag.
Comment 1 Brandon Andrews 2012-07-15 21:03:31 PDT
Here's an example that complies with the DOM 3 events
<!doctype html>
<html lang="en">
<title>Dom 3 Buttons</title>
<script type="text/javascript">
"use strict";

window.onload = function()
	window.addEventListener("mousedown", function(e)
	}, false);
	window.addEventListener("mouseup", function(e)
	}, false);

The information for implementing it is in the spec:

Currently it's undefined in webkit.
Comment 2 Fujii Hironori 2019-09-03 20:07:17 PDT

*** This bug has been marked as a duplicate of bug 178214 ***