RESOLVED WORKSFORME 12524
document.open() twice causes iframe to go blank
https://bugs.webkit.org/show_bug.cgi?id=12524
Summary document.open() twice causes iframe to go blank
nrlz
Reported 2007-01-31 23:29:07 PST
While trying to make a rich text editor, I found that calling document.open/write/close twice and writing content which contains a <link type=text/css> tag, will cause the editor to go blank (white). The editor contents will only show if I click on it. If I focus away (to the address bar), it goes blank again. If I change the iframe contents with innerHTML, it goes blank again. Specifically: with(frames[0].document) { designMode = "on"; open("text/html"); write("<html>"); write("<head><link type='text/css'></head>"); write("<body bgcolor='#ffc'>editable text</body>"); write("</html>"); close(); open("text/html"); write("<html>"); write("<head><link type='text/css'></head>"); write("<body bgcolor='#ffc'>editable text</body>"); write("</html>"); close(); }
Attachments
testcase (998 bytes, text/html)
2007-01-31 23:30 PST, nrlz
no flags
nrlz
Comment 1 2007-01-31 23:30:23 PST
Created attachment 12850 [details] testcase
Alexey Proskuryakov
Comment 2 2007-02-06 11:40:09 PST
Most of the issues in the test case appear to be fixed in current WebKit, but step 1 is still problematic - drawing seems to happen after a significant timeout, or after a mouse move (or maybe just a mouse move, hard to tell).
Justin Garcia
Comment 3 2007-03-06 22:10:08 PST
The fact that designMode is turned on in the subframe doesn't seem to have any effect on the time it takes for its content to appear, so I'm moving this bug to the Forms component.
Alexey Proskuryakov
Comment 4 2008-11-28 13:27:15 PST
This works 100% correctly for me with r38816.
Note You need to log in before you can comment on or make changes to this bug.