<?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>63922</bug_id>
          
          <creation_ts>2011-07-05 00:31:46 -0700</creation_ts>
          <short_desc>document.all &amp; document.activeElement undefined in xhtml page</short_desc>
          <delta_ts>2014-06-21 13:30:38 -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>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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>shuchen.net</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>7raivis</cc>
    
    <cc>ap</cc>
    
    <cc>bedney</cc>
    
    <cc>dominicc</cc>
    
    <cc>fddima</cc>
    
    <cc>solushex</cc>
    
    <cc>sonny.piers</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>432131</commentid>
    <comment_count>0</comment_count>
    <who name="">shuchen.net</who>
    <bug_when>2011-07-05 00:31:46 -0700</bug_when>
    <thetext>1. Visit the xhtml page at http://www.battlenet.com.cn/ or http://inputtools.appspot.com/main.py
2. In the address bar, type: &quot;javascript:alert(document.activeElement);&quot;

Expected:
The alert dialog tells document.activeElement is not undefined.

Actual:
The alert dialog tells &quot;undefined&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>432182</commentid>
    <comment_count>1</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2011-07-05 03:12:17 -0700</bug_when>
    <thetext>document.activeElement and document.all are defined on HTML documents, see for example:

&lt;http://www.whatwg.org/specs/web-apps/current-work/#dom-document-activeelement&gt;
&lt;http://www.whatwg.org/specs/web-apps/current-work/#dom-document-all&gt;

XHTML documents are not HTML documents (open the web inspector on one of those pages and look at document.constructor, for example, and compare it with the document.constructor of a HTML page such as this one.)

So I think it is correct for document.activeElement and document.all to be undefined in an XHTML page.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>432329</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-07-05 10:50:20 -0700</bug_when>
    <thetext>This is incorrect.

All documents in an HTML5 compliant engine must implement HTMLDocument interface, see &lt;http://www.whatwg.org/specs/web-apps/current-work/#documents-in-the-dom&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>504742</commentid>
    <comment_count>3</comment_count>
    <who name="Dmitry Azaraev">fddima</who>
    <bug_when>2011-11-17 04:28:47 -0800</bug_when>
    <thetext>I agree with Alexey.
Even more - now activeElement it is part of partial Document interface.
And it is blocker for custom UI toolkits to use XHTML instead of HTML.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>662890</commentid>
    <comment_count>4</comment_count>
    <who name="sonny.piers@gmail.com">sonny.piers</who>
    <bug_when>2012-07-04 05:33:41 -0700</bug_when>
    <thetext>Any update on this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>734660</commentid>
    <comment_count>5</comment_count>
    <who name="William J. Edney">bedney</who>
    <bug_when>2012-10-04 07:08:09 -0700</bug_when>
    <thetext>XHTML5 is the XML formulation of HTML5 and is being used out there.

It&apos;d be nice to get this fixed. Anything I can do to help? (I&apos;m not a C programmer, but I can write tests, etc.).

Cheers,

- Bill</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>882194</commentid>
    <comment_count>6</comment_count>
    <who name="sonny.piers@gmail.com">sonny.piers</who>
    <bug_when>2013-04-27 11:20:46 -0700</bug_when>
    <thetext>Same problem with window.hasFocus().</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>