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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>20236</bug_id>
          
          <creation_ts>2012-12-04 16:28:51 +0000</creation_ts>
          <short_desc>3.1.1.1 button value -1 isn&apos;t possible</short_desc>
          <delta_ts>2014-02-13 22:57:19 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - DOM3 Events</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Olli Pettay">bugs</reporter>
          <assigned_to name="Travis Leithead [MSFT]">travil</assigned_to>
          <cc>mike</cc>
    
    <cc>public-pointer-events</cc>
    
    <cc>travil</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>79412</commentid>
    <comment_count>0</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-12-04 16:28:51 +0000</bug_when>
    <thetext>In 3.1.1.1 there is
-1 value for button. That isn&apos;t possible since button is unsigned short.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79423</commentid>
    <comment_count>1</comment_count>
    <who name="Jacob Rossi [MSFT]">jrossi</who>
    <bug_when>2012-12-04 18:40:15 +0000</bug_when>
    <thetext>Here&apos;s my thinking on this issue:

1) Current PE spec text changes the values of button/buttons when firing pointer events
2) Current PE spec text does not change the values used when firing mouse events
3) DOM L3 Events defines button/buttons as an unsigned short
4) D3E implementations do not have interop* on how to handle the edge-case where you create a MouseEvent with a negative value for button.
4) (signed) short allows all the values required by D3E and also those by PE

So my suggestion to resolve this issue is as follows:

1) Leave D3E spec as is.
2) Add to PE spec a partial MouseEvent interface that redefines button and buttons as short instead of unsigned short.
3) Include a note that PE&apos;s definition supersedes D3E and that implementations


* Using this test code:
var m = document.createEvent(&quot;MouseEvent&quot;);
m.initMouseEvent(&quot;mousedown&quot;, true,true,window,null,0,0,0,0,false,false,false,false, -1, null); 
console.log(m.button)

Gecko: 65535 (wraps around), Webkit: 0 (snaps), IE9: -1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79424</commentid>
    <comment_count>2</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-12-04 18:48:15 +0000</bug_when>
    <thetext>(In reply to comment #1) 
&gt; 2) Add to PE spec a partial MouseEvent interface that redefines button and
&gt; buttons as short instead of unsigned short.
As far as I know, you can&apos;t redefine property to be different type in partial interface.
I&apos;d be surprised if it is possible even in inheriting interface.

Need to check what WebIDL says.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79426</commentid>
    <comment_count>3</comment_count>
    <who name="Jacob Rossi [MSFT]">jrossi</who>
    <bug_when>2012-12-04 18:57:19 +0000</bug_when>
    <thetext>The suggestion isn&apos;t that a partial interface can redefine another interface. I don&apos;t think WebIDL has a convention for one spec to override another. I think the only way to redefine an interface is via explicit spec text that says Pointer Events&apos; definition supersedes DOM L3 Events&apos; definition.

The reason I suggested it be a partial interface is just because we only need to mention button and buttons. No need to completely redefine MouseEvent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82252</commentid>
    <comment_count>4</comment_count>
    <who name="Jacob Rossi [MSFT]">jrossi</who>
    <bug_when>2013-01-29 03:23:09 +0000</bug_when>
    <thetext>Sent mail to WebApps to request this change be made to DOM L3 &amp; UI Events. 

http://lists.w3.org/Archives/Public/www-dom/2013JanMar/0080.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100459</commentid>
    <comment_count>5</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2014-02-13 01:01:00 +0000</bug_when>
    <thetext>Moving (with JRossi&apos;s permission) to DOM3 Events.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100566</commentid>
    <comment_count>6</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2014-02-13 22:57:19 +0000</bug_when>
    <thetext>Fixed just now in editor&apos;s draft:
https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html

unsigned short -&gt; short in various places.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>