Ticket #7097 (closed defect: fixed)

Opened 5 months ago

Last modified 3 months ago

Editor has initialization problems when inlined into mail.html

Reported by: bill Owned by: bill
Priority: normal Milestone: 1.2
Component: Editor Version: 1.1.1
Severity: normal Keywords:
Cc:

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

mailInline.html (16.4 kB) - added by bill 5 months ago.

Change History

Changed 5 months ago by bill

Changed 5 months 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.

Changed 5 months 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.

Changed 5 months ago by bill

  • status changed from new to closed
  • resolution set to fixed

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

Changed 5 months ago by bill

  • status changed from closed to reopened
  • resolution deleted

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

Changed 5 months ago by bill

  • owner changed from liucougar to bill
  • status changed from reopened to new

Changed 5 months ago by bill

  • status changed from new to closed
  • resolution set to fixed

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

Changed 3 months ago by doughays

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

Changed 3 months ago by doughays

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

Note: See TracTickets for help on using tickets.