Closed
Bug 263392
Opened 20 years ago
Closed 17 years ago
Setting designMode doesn't work for display:none iframes
Categories
(Core :: DOM: Editor, defect)
Tracking
()
VERIFIED
DUPLICATE
of bug 389350
People
(Reporter: martijn.martijn, Unassigned)
References
Details
Attachments
(2 files)
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.
Reporter | ||
Comment 1•20 years ago
|
||
Comment 2•20 years ago
|
||
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.
Comment 4•20 years ago
|
||
No, that's bug 217205, not this bug.
Updated•18 years ago
|
QA Contact: bugzilla → editor
Updated•18 years ago
|
Assignee: mozeditor → nobody
Comment 5•17 years ago
|
||
It also happens when the iframe is contained in some element that has display:none.
Comment 6•17 years ago
|
||
Comment 7•17 years ago
|
||
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)
Comment 8•17 years ago
|
||
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
Closed: 17 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 9•17 years ago
|
||
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.
Description
•