<?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>23697</bug_id>
          
          <creation_ts>2013-11-01 07:23:12 +0000</creation_ts>
          <short_desc>KeyboardEventInit in UI Events doesn&apos;t include keyCode/charCode/which but in D3E, it includes them</short_desc>
          <delta_ts>2014-04-08 00:31:12 +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>All</rep_platform>
          <op_sys>All</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="Masayuki Nakano">masayuki</reporter>
          <assigned_to name="Travis Leithead [MSFT]">travil</assigned_to>
          <cc>garykac</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</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>95654</commentid>
    <comment_count>0</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2013-11-01 07:23:12 +0000</bug_when>
    <thetext>UI Event defines:

&gt; dictionary KeyboardEventInit : UIEventInit {
&gt;     DOMString     char = &quot;&quot;;
&gt;     DOMString     key = &quot;&quot;;
&gt;     DOMString     code = &quot;&quot;;
&gt;     unsigned long location = 0;
&gt;     boolean       ctrlKey = false;
&gt;     boolean       shiftKey = false;
&gt;     boolean       altKey = false;
&gt;     boolean       metaKey = false;
&gt;     boolean       repeat = false;
&gt;     DOMString     locale = &quot;&quot;;
&gt; };

D3E defines:

&gt; dictionary KeyboardEventInit {
&gt;     boolean       bubbles = false;
&gt;     boolean       cancelable = false;
&gt;     AbstractView? view = null;
&gt;     long          detail = 0;
&gt;     DOMString     key = &quot;&quot;;
&gt;     unsigned long location = 0;
&gt;     boolean       ctrlKey = false;
&gt;     boolean       shiftKey = false;
&gt;     boolean       altKey = false;
&gt;     boolean       metaKey = false;
&gt;     boolean       repeat = false;
&gt;     DOMString     locale = &quot;&quot;;
&gt;     unsigned long charCode = 0;
&gt;     unsigned long keyCode = 0;
&gt;     unsigned long which = 0;
&gt; };

UI Events&apos; definition doesn&apos;t include charCode/keyCode/which. However, all attributes which are legacy should be able to be initialized at constructing events.
# UI Events still have &quot;char&quot;, so, I think that UI Events&apos;s definition is older than D3E&apos;s.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95655</commentid>
    <comment_count>1</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2013-11-01 07:27:19 +0000</bug_when>
    <thetext>NOTE:

If this is a bug of D3E, they should be dropped from next WD.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95658</commentid>
    <comment_count>2</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2013-11-01 08:46:24 +0000</bug_when>
    <thetext>Random thought:

If .keyCode/.charCode/.which are not initialized from KeyboardEvent constructor, web apps which handle the legacy attributes need to initialize them with initKey(board)Event which are different on each browser. So, ignoring them from initialization list might make creating automated tests for such web apps harder.

If they are not initialized from KeyboardEvent constructor, web apps also need to call initKey(board)Event() after that. It sounds the code is redundant.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99884</commentid>
    <comment_count>3</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2014-02-06 09:36:59 +0000</bug_when>
    <thetext>-&gt; D3E since the constructor is moved to D3E from UI Events.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103519</commentid>
    <comment_count>4</comment_count>
    <who name="Gary Kacmarcik">garykac</who>
    <bug_when>2014-04-08 00:31:12 +0000</bug_when>
    <thetext>This information has been added to Appendix B - &quot;Legacy Key Attributes&quot; next to where charCode, keyCode and which are added to the KeyboardEvent.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>