document.open/write/close removes event listeners

RESOLVED DUPLICATE of bug 357651

Status

()

--
major
RESOLVED DUPLICATE of bug 357651
12 years ago
8 years ago

People

(Reporter: erik, Unassigned)

Tracking

({regression, testcase})

Trunk
x86
Windows XP
regression, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
Using document.write (etc) removes any event listeners added to the body.

Using

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7

Steps to reproduce:

1. Create a frame
2. document.open()
3. document.write('hi')
4. document.close()
5. documen.onclick = f;

after about a half second document.onclick is reset to undefined

Expected behavior:

document.onclick should not be removed


Possible workaround includes using document.addEventListener instead.
(Reporter)

Comment 1

12 years ago
Created attachment 240219 [details]
Watch the document title and the text below the iframe
Keywords: regression, testcase

Updated

12 years ago
Summary: document.open/write/close removes events → document.open/write/close removes event listeners
I can't reproduce this anymore, marking fixed thanks to bug 357651.
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
(Reporter)

Comment 4

12 years ago
Yeah, this seems ok now. I wonder when it was fixed?
Resolution: FIXED → DUPLICATE
Duplicate of bug: 357651
You need to log in before you can comment on or make changes to this bug.