Summary: | document.getElementById does not behave in the same way as Internet Explorer (Win) | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andrew Wellington <andrew> | ||||
Component: | DOM | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED INVALID | ||||||
Severity: | Normal | CC: | ap, cdumez, ian, jason.hu, rniwa, zcorpan | ||||
Priority: | P2 | ||||||
Version: | 420+ | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.4 | ||||||
Attachments: |
|
Description
Andrew Wellington
2005-12-08 03:57:59 PST
Created attachment 5000 [details]
Simple demonstration page
To clarify, when IE walks the tree looking for elements that match the document.getElementById() request, it returns the first element that matches: - id is equal to requested id - element is a form element, and its name matches the requested id If any such broken behavior is introduced, it should be only exist in some alternative 'compliant' mode. IE is simply wrong, and steadily losing market share. Suggest you change this bug to invalid. (Some believe that 'de facto' standards present in other browsers are more important than the Standards themselves. I believe the opposite. Matching the spec instead of IE is not a 'bug'. I accept that there are people with both opinions; I do not know which opinion drives Safari's development team.) *** Bug 15127 has been marked as a duplicate of this bug. *** From bug 15127: Opera has this quirk, but is apparently going to remove it from their 9.50 release: "Removed IE-compatibility where Document.getElementById treated name and id attributes the same, which caused problems with jQuery." This causes major problems at the site of Beeline, a major mobile provider in Russia. Affected pages are only available to customers. "http://markets.themarker.com/tmc/investorGuide.jhtml?layer=investorGuide" (a major Israeli finance portal also has this issue) Is this still an issue? # [13:14] <zcorpan> it seems we have lots of bugs saying that getElementById works with name='' # [13:14] <zcorpan> which we dropped in 9.5 # [13:15] <zcorpan> and no bugs on it not working with name='', afaict # [13:15] <zcorpan> also, i think ie8 doesn't look at name='' (in ie8 mode) This is no longer the case with newer versions of IE (e.g. IE9). Mass moving XML DOM bugs to the "DOM" Component. |