Open Bug 419054 Opened 12 years ago Updated 3 years ago

DesignMode iframe doesn't stay in designMode after going to a different url and going back in iframe

Categories

(Core :: Editor, defect)

x86
Windows XP
defect
Not set

Tracking

()

REOPENED

People

(Reporter: martijn.martijn, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(1 file)

Attached file testcase
See testcase, after function doe3 has been called, I would expect the iframe to be in the designMode state again, but that isn't the case in current trunk build.
I also see this on branch (and 1.7 branch), so this doesn't seem to be a recent regression.
Blocks: 424615
Dupe of 386782.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 386782
Oops, this isn't a duplicate of bug 386782, its patch doesn't fix it. Also disabling the bfcache doesn't prevent this from happening, but it does prevent bug 386782 from occurring, so these bugs are not caused by the same thing.

This bug also affects iframes in contentEditable mode, and iframes that are sourced directly from a file (not just src="data:text/html..." like in the testcase).
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
For the record, this isn't a regression, we get the same behaviour in FF2.

There are (at least) two problems here:

1. We don't cache subframes - At http://mxr.mozilla.org/seamonkey/source/docshell/base/nsDocShell.cpp#5293 we check the pref browser.sessionhistory.cache_subframes, and don't cache the presentation for the iframe when it's false. Unfortunately this pref doesn't exist, and the return value of GetBoolPref() isn't checked, so the default of false, remains, and the contentviewer isn't saved.

2. We don't restore editableness in subframes - If we add browser.sessionhistory.cache_subframes=true in about:config, we at least cache and restore the presentation (i.e. if we make changes to the iframes's document, they're still there when we navigate back). The iframe reports as being in designMode, but its not actually editable. The editor isn't being reattached for subframes.
Issue #2 is definitely a bug that we should fix at some point.

But this bug, as reported, should be WONTFIX. Setting designmode on a subframe is just like changing its DOM; if you navigate away and then back again, the document might need to be reloaded, and if it is reloaded, DOM changes are lost.

So either we WONTFIX this bug or we morph it into Chris' issue #2.
Note to self, if this bug gets fixed, also make sure that https://bugzilla.mozilla.org/attachment.cgi?id=305014 is fixed (from bug 416751).
Status: REOPENED → RESOLVED
Closed: 12 years ago3 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
You need to log in before you can comment on or make changes to this bug.