Bug 63922
| Summary: | document.all & document.activeElement undefined in xhtml page | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | shuchen.net |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | 7raivis, ap, bedney, dominicc, fddima, solushex, sonny.piers |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
shuchen.net
1. Visit the xhtml page at http://www.battlenet.com.cn/ or http://inputtools.appspot.com/main.py
2. In the address bar, type: "javascript:alert(document.activeElement);"
Expected:
The alert dialog tells document.activeElement is not undefined.
Actual:
The alert dialog tells "undefined".
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Dominic Cooney
document.activeElement and document.all are defined on HTML documents, see for example:
<http://www.whatwg.org/specs/web-apps/current-work/#dom-document-activeelement>
<http://www.whatwg.org/specs/web-apps/current-work/#dom-document-all>
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.
Alexey Proskuryakov
This is incorrect.
All documents in an HTML5 compliant engine must implement HTMLDocument interface, see <http://www.whatwg.org/specs/web-apps/current-work/#documents-in-the-dom>.
Dmitry Azaraev
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.
sonny.piers@gmail.com
Any update on this?
William J. Edney
XHTML5 is the XML formulation of HTML5 and is being used out there.
It'd be nice to get this fixed. Anything I can do to help? (I'm not a C programmer, but I can write tests, etc.).
Cheers,
- Bill
sonny.piers@gmail.com
Same problem with window.hasFocus().