User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041007 Firefox/0.9.1+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041007 Firefox/0.9.1+ See upcoming testcase. This is a spinoff of bug 262998. Setting designMode='on' doesn't work for iframes with style="display:none". Instead, you'll get a js error message: Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.designMode]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: https://bugzilla.mozilla.org/attachment.cgi?id=161379&action=view :: onclick :: line 1" data: no] Reproducible: Always Steps to Reproduce: 1. 2. 3.
One problem is that nsEditingSession::SetupEditorOnWindow requires a presshell. If that dep is removed (null checks instead of early returns), something still throws NULL_POINTER. Perhaps we should simply init the editing stuff when a document in designmode gets a presshell? After all, the document knows it's in designmode...
Another reproductions of what i think is the same bug: http://gerard.yoursite.nl/got/designMode/index3.html This one doesn't throw an exception (or it isn't caught), and the designMode property is set.
No, that's bug 217205, not this bug.
It also happens when the iframe is contained in some element that has display:none.
Also, if you try to write to the iframe document after the exception, then Firefox flickers constantly until the iframe is displayed. See attached testcase. It would seem that the exception leaves the iFrame in an 'unstable' state, neither DesignMode=on or off. (I'm adding this comment as the flickering is another symptom of the same problem)
This bug is the same as bug 389350, the patch for that will fix this. Marking this as duplicate of bug 389350.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 389350
Verified duplicate, using: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a9pre) Gecko/2007110405 Minefield/3.0a9pre
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.