Closed
Bug 603591
Opened 14 years ago
Closed 14 years ago
When getting the element associated with an id using IDTargetObserver, ids with a spaces character are ignored
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
INVALID
People
(Reporter: mounir, Unassigned)
Details
(Keywords: testcase)
Attachments
(1 file)
1.13 KB,
text/html
|
Details |
This is not consistent with .getElementById() which accept spaces in ids even if that's invalid. As a consequence, .form and .list doesn't have the same behavior (see test case).
Reporter | ||
Comment 1•14 years ago
|
||
The testcase only works with a nightly build.
Comment 2•14 years ago
|
||
Uh... there should be no such restriction. Can you point me to the relevant .form and .list code?
Comment 3•14 years ago
|
||
And in particular, getElementById and IDTargetObservers use the same exact hashtable...
Reporter | ||
Comment 4•14 years ago
|
||
(In reply to comment #2) > Uh... there should be no such restriction. Can you point me to the relevant > .form and .list code? GetList: http://mxr.mozilla.org/mozilla-central/source/content/html/content/src/nsHTMLInputElement.cpp#1110 GetForm: It's harder because it's returning mForm which is set in different ways, the observer is added like that: http://mxr.mozilla.org/mozilla-central/source/content/html/content/src/nsGenericHTMLElement.cpp#2796 AFAIK, there is nothing checking for space characters in the id in those code so I'm assuming the difference comes from the different way we use to get the elements associated with the ids.
Reporter | ||
Comment 5•14 years ago
|
||
Sorry, my testcase was stupid so do I :(
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•