<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>81855</bug_id>
          
          <creation_ts>2012-03-21 18:04:35 -0700</creation_ts>
          <short_desc>DOM 3 Event, Implement MouseEvent buttons member</short_desc>
          <delta_ts>2019-09-03 20:07:17 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>UI Events</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>178214</dup_id>
          
          <bug_file_loc>http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-MouseEvent-buttons</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Brandon Andrews">sirisian</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>fujii</cc>
    
    <cc>syoichi</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>584844</commentid>
    <comment_count>0</comment_count>
    <who name="Brandon Andrews">sirisian</who>
    <bug_when>2012-03-21 18:04:35 -0700</bug_when>
    <thetext>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 &quot;buttons&quot; does just that. It&apos;s the IE bitflags such that each button on the mouse (defined for 1-5 buttons currently) has a unique bit flag.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>670067</commentid>
    <comment_count>1</comment_count>
    <who name="Brandon Andrews">sirisian</who>
    <bug_when>2012-07-15 21:03:31 -0700</bug_when>
    <thetext>Here&apos;s an example that complies with the DOM 3 events
http://sirisian.com/javascript/dom3buttons.html
source:
&lt;!doctype html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
&lt;title&gt;Dom 3 Buttons&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&quot;use strict&quot;;

window.onload = function()
{
	window.addEventListener(&quot;mousedown&quot;, function(e)
	{
		e.preventDefault();
		console.log(e.buttons);
	}, false);
	window.addEventListener(&quot;mouseup&quot;, function(e)
	{
		e.preventDefault();
		console.log(e.buttons);
	}, false);
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;/body&gt;
&lt;/html&gt;

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&apos;s undefined in webkit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567614</commentid>
    <comment_count>2</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2019-09-03 20:07:17 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 178214 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>