Opened 14 years ago

Closed 11 years ago

#7000 closed defect (fixed)

RichText clobbers body attributes

Reported by: guest Owned by:
Priority: high Milestone: 1.7
Component: Editor Version: 1.1.1
Keywords: RichText body attribute document.write Cc:
Blocked By: Blocking:


RichText, whenever the control is dojo.require()d (in the head element) and not necessarily even used, calls dojo.doc.write to insert a text area. This ends up clobbering body attributes in IE7, FF2, & FF3. It seems to force the browser into creating a body element prematurely, and this is done without any custom attributes coded for the body element on the page: those attributes are lost. For example, if you have body class=”tundra” dojo=”toolkit” greeting=”hello”, then only class survives. To test this, take test_Editor.html, add attributes like those above to the body element, add a breakpoint at the end of the automated test script. Inspect dojo.body().outerHTML or try dojo.body().getAttribute(“greeting”) and see that only the class attribute survives. Now in RichText.js comment out the dojo.doc.write lines at the top of the file. Run the test again and see all attributes present. RichText initialization should probably be redesigned. dojo.addOnLoad() seems to work where dojo._postLoad should not be used. There really should be way to add the text area only when there is a RichText on the page rather than when the control is simply dojo.require()d.

Change History (4)

comment:1 Changed 14 years ago by bill

Component: DijitEditor
Owner: set to liucougar

comment:2 Changed 13 years ago by bill

Milestone: 1.21.4

comment:3 Changed 12 years ago by bill

Milestone: 1.4future
Owner: liucougar deleted

comment:4 Changed 11 years ago by Jared Jurkiewicz

Milestone: future1.7
Resolution: fixed
Status: newclosed

I believe this is fixed in 1.7 with the AMD change and the way the RTE does save area state has been modified.

Note: See TracTickets for help on using tickets.