Bug 223712
| Summary: | HTMLFormElement.elements should not return images | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Marvin Scholz <epirat07> |
| Component: | Forms | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | cdumez, gsnedders, wenson_hsieh |
| Priority: | P2 | ||
| Version: | Safari 14 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Marvin Scholz
According to https://html.spec.whatwg.org/multipage/forms.html#category-listed the HTMLFormElement elements
property should not list img elements in forms, this does seem to work fine, except when explicitly accessing by ID.
For example given the following HTML:
<form id="test_form">
<input type="text" name="example_text_input">
<img alt="example" id="test_img" width="10" height="10" src="…">
</form>
Querying the elements with the img id like this:
document.forms['test_form'].elements['test_img']
should return undefined, like it happens in other browsers (tested with Firefox and Chrome), but it actually returns the img element.
Possibly related to #87834
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Sam Sneddon [:gsnedders]
*** This bug has been marked as a duplicate of bug 87834 ***