Setting designMode doesn't work for display:none iframes

VERIFIED DUPLICATE of bug 389350

Status

()

VERIFIED DUPLICATE of bug 389350
14 years ago
11 years ago

People

(Reporter: martijn.martijn, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

14 years ago
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

14 years ago
Created attachment 161417 [details]
Testcase
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...
(Reporter)

Updated

14 years ago
Blocks: 217205

Comment 3

14 years ago
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.
QA Contact: bugzilla → editor
Assignee: mozeditor → nobody

Comment 5

12 years ago
It also happens when the iframe is contained in some element that has display:none.

Comment 6

11 years ago
Created attachment 286697 [details]
Testcase showing flickering

Comment 7

11 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)
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
(Reporter)

Comment 9

11 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.