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(); }
Created attachment 12850 [details] testcase
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).
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.
This works 100% correctly for me with r38816.