503 bytes, text/html
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:18.104.22.168) Gecko/20060909 Firefox/22.214.171.124 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.
This regressed between 2005-8-19 and 2005-08-20: http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-8-19+07&maxdate=2005-8-20+09&cvsroot=%2Fcvsroot I guess a regression from bug 303981 or bug 303765?
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
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.