Closed Bug 207413 Opened 23 years ago Closed 23 years ago

Midas: designMode = "on" fails for a newly created iframe

Categories

(Core :: DOM: Editor, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.5alpha

People

(Reporter: emaijala+moz, Assigned: jst)

References

()

Details

(Whiteboard: [HAVE FIX])

Attachments

(2 files)

I have a simple page with javascript to create an iframe for Midas and set designMode = "on". The script looks like this: document.writeln("<iframe id="edit"></iframe>"); document.getElementById("edit").contentDocument.designMode = "on"; The second line doesn't work and an error is logged into JS console. I debugged it and found out that the document of the iframe doesn't have a mime type yet when it's checked in nsEditingSession::SetupEditorOnWindow(). nsDocument::StartDocumentLoad() which sets the mime type is called after setting the designMode and then it's too late. Of course there are ways to circumvent this problem, but I think it should work without any hacks. Jst, do you have any ideas? Is there anything that could be done to fix this?
Attached file A simple test case
Comment on attachment 124402 [details] [diff] [review] Make nsHTMLDocument always default its content type to text/html. Looks good and works great. r=ere@atp.fi
Attachment #124402 - Flags: review+
Flags: blocking1.4?
Attachment #124402 - Flags: superreview?(kin)
-->jst since it's his fix; kin please sr= jst's small change (moving code from one method to another)
Assignee: jfrancis → jst
Status: NEW → ASSIGNED
Priority: -- → P2
Hardware: PC → All
Whiteboard: [HAVE FIX]
Target Milestone: --- → mozilla1.5alpha
Attachment #124402 - Flags: superreview?(kin) → superreview+
Comment on attachment 124402 [details] [diff] [review] Make nsHTMLDocument always default its content type to text/html. a=mkaply for 1.4
Attachment #124402 - Flags: approval1.4+
Comment on attachment 124402 [details] [diff] [review] Make nsHTMLDocument always default its content type to text/html. a=mkaply for 1.4
Fix is checked in to 1.4, waiting for trunk to open.
Flags: blocking1.4?
Keywords: fixed1.4
Fixed in trunk too.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Trunk build 2003-06-10: Win2k Branch build 2003-06-12: Win2k I don't see any JS errors using the trunk and branch builds on win2k and the test cases provided in comment# 1.
thanks for checking this on win2k, Ninoschka. this also works fine on mac 10.2.6 (2003.06.13.05-1.4) and linux rh7.2 (2003.06.11.07-1.4), commercial branch. marking verified1.4.
Keywords: fixed1.4verified1.4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: