Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#7097 closed defect (fixed)

Editor has initialization problems when inlined into mail.html

Reported by: bill Owned by: bill
Priority: high Milestone: 1.2
Component: Editor Version: 1.1.1
Keywords: Cc:
Blocked By: Blocking:

Description

See attached mailInline.html file.

If loading the Editor in the mail demo directly rather than through an href of a ContentPane, browsers fall over in various ways:

  • FF2: null exception
  • FF3: permission denied to get HTMLDivElement.parentNode
  • safari: RichTextArea has zero height
  • IE6: works fine

Attachments (1)

mailInline.html (16.4 KB) - added by bill 11 years ago.

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by bill

Attachment: mailInline.html added

comment:1 Changed 11 years ago by bill

(In [14414]) Fix non-portable code for padding calculations, refs #6764 !strict. This fixes mail demo editor layout problems in safari, refs #7096, #7097.

comment:2 Changed 11 years ago by bill

Note that after the above fix, inlining the Editor is working everywhere but FF2, where we get problems initializing the iframe ("contentDoc has no properties").

RichText.postCreate() --> RichText.open() --> RichTextIframeMixin._writeOpen() --> _drawIframe() which does:

var contentDoc = this.iframe.contentDocument;
contentDoc.open();
contentDoc.write(this._getIframeDocTxt(html));
contentDoc.close();

(but contentDoc is null) I'm guessing we need a setInterval()/dojo.connect() type solution like we currently have for other browsers, in the case when they are using iframes:

if(dojo.isIE && dojo.isIE < 7){ // IE 6 is a steaming pile...
	var t = setInterval(function(){
		if(ifr.contentWindow.isLoaded){
			clearInterval(t);
			loadFunc();
		}
	}, 100);
}else{ // blissful sanity!
	h = dojo.connect(
		((dojo.isIE) ? ifr.contentWindow : ifr), "onload", loadFunc
	);
}

Alternately perhaps there's a problem where the Editor is initializing w/out being connected to the document and could be fixed that way; need to look into how Declare works.

comment:3 Changed 11 years ago by bill

Resolution: fixed
Status: newclosed

(In [14417]) Inline Editor markup into mail.html, rather than creating it programatically, after race condition fix for iframe initialization on FF2. The code for iframe initialization is pretty messy in that it has separate paths for IE/FF (only FF2 calls _drawIFrame()), and should be cleaned up at some point. Fixes #7097 !strict.

comment:4 Changed 11 years ago by bill

Resolution: fixed
Status: closedreopened

Doh, after [14417] the last two tests in test_Editor.html on FF2 have no toolbar. Will fix...

comment:5 Changed 11 years ago by bill

Owner: changed from liucougar to bill
Status: reopenednew

comment:6 Changed 11 years ago by bill

Resolution: fixed
Status: newclosed

(In [14499]) Iframe goes through various initialization stages; there are multiple points where you need to delay. This change makes editor initialization in test_Editor.html and mail.html work correctly.

Fixes #7097 !strict.

comment:7 Changed 11 years ago by Douglas Hays

(In [15173]) Fixes #7614. References #7097. Remerge Editor change from [14417].

comment:8 Changed 11 years ago by Douglas Hays

(In [15195]) Fixes #7614. References #7097. Remerge Editor change from [14499].

Note: See TracTickets for help on using tickets.