WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 178214
81855
DOM 3 Event, Implement MouseEvent buttons member
https://bugs.webkit.org/show_bug.cgi?id=81855
Summary
DOM 3 Event, Implement MouseEvent buttons member
Brandon Andrews
Reported
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Brandon Andrews
Comment 1
2012-07-15 21:03:31 PDT
Here's an example that complies with the DOM 3 events
http://sirisian.com/javascript/dom3buttons.html
source: <!doctype html> <html lang="en"> <head> <title>Dom 3 Buttons</title> <script type="text/javascript"> "use strict"; window.onload = function() { window.addEventListener("mousedown", function(e) { e.preventDefault(); console.log(e.buttons); }, false); window.addEventListener("mouseup", function(e) { e.preventDefault(); console.log(e.buttons); }, false); } </script> </head> <body> </body> </html> The information for implementing it is in the spec:
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-MouseEvent-buttons
Currently it's undefined in webkit.
Fujii Hironori
Comment 2
2019-09-03 20:07:17 PDT
*** This bug has been marked as a duplicate of
bug 178214
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug