Closed Bug 850804 Opened 11 years ago Closed 11 years ago

setting innerHTML doesn't remove all checkboxes

Categories

(Core :: DOM: Core & HTML, defect)

19 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: gilleswork, Unassigned)

References

Details

(Keywords: dev-doc-needed)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
Build ID: 20130307023931

Steps to reproduce:

A form contains a div containing input checkboxes. The div has its content removed by setting its innerHTML property to an empty string.


Actual results:

The last checkbox is not removed from the div.


Expected results:

All the checkboxes should be removed from the div.

Please note that this seems to happen only when a reference to the form is retrieved with document.getElementById() before setting innerHTML.
Attachment #724555 - Attachment mime type: text/plain → text/html
For me all Checkboxes are being removed running Attachment 724555 [details] and testing:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 ID:20130307074601 CSet: 8f1bec301236 (i.e. ESR)

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0 ID:20130307023931 CSet: 6ffe3e9da8a8 (i.e. current Release)

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20130314 Firefox/22.0 ID:20130314030914 CSet: b672877ed046 (i.e. Trunk)
form.a: [object NodeList], length: 1, 1rst element: 3

confirming with Firefox trunk on win7
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Core & HTML
Ever confirmed: true
Product: Firefox → Core
There's good chance this is a duplicate of the "resolve hooks are broken" thing and that bug 841442 will fix this.
Depends on: 841442
Fixed by bug 841442.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
Target Milestone: --- → mozilla24
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: