<?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>28652</bug_id>
          
          <creation_ts>2015-05-18 07:34:21 +0000</creation_ts>
          <short_desc>[Shadow] Need Document.deepActiveElement</short_desc>
          <delta_ts>2015-06-02 02:26:32 +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 - Component Model</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</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="Takayoshi Kochi">kochi</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>annevk</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>120336</commentid>
    <comment_count>0</comment_count>
    <who name="Takayoshi Kochi">kochi</who>
    <bug_when>2015-05-18 07:34:21 +0000</bug_when>
    <thetext>According to the current spec,
http://w3c.github.io/webcomponents/spec/shadow/#active-element
Document.activeElement returns &quot;adjusted&quot; element, i.e.
when the real focused element is within a shadow tree, it returns
the top-most shadow host in the Document treescope.

The real focused element can be retrieved by recursively applying
.activeElement against shadowRoots on the way, but it may be
convenient to have a way to directly retrieve the element from Document.

One use case is for accessibility plugins; when a web app is provided
as one custom element (e.g. &lt;topeka-app&gt; at https://polymer-topeka.appspot.com/),
Document.activeElement always points to &lt;topeka-app&gt;,  which does not make
much sense for accessibility plugins.
It may be also necessary to have another type of event than &quot;focus&quot;, which
fires when Document.activeElement changes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120649</commentid>
    <comment_count>1</comment_count>
    <who name="Takayoshi Kochi">kochi</who>
    <bug_when>2015-06-02 02:26:32 +0000</bug_when>
    <thetext>Moved to GitHub issue.
https://github.com/w3c/webcomponents/issues/104</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>