Opened 12 years ago

Closed 9 years ago

#4771 closed defect (fixed)

Editor: programmatically created Editors cannot be added to Dialogs

Reported by: guest Owned by:
Priority: high Milestone: 1.5
Component: Dijit Version: 0.9
Keywords: Cc: tk
Blocked By: Blocking:

Description (last modified by bill)

Firefox 2, Mac OS X

HOW TO REPRODUCE:

Go to http://82.230.65.68:31416/~fred/dojo/fred_samples/bug_014.html
Try to type text in the dijit.Editor

RESULT:

One cannot type text

EXPECTED RESULT:

Text can be typed, made bold, italic, etc

COMMENT:

The dijit is created in a div that is added to the dialog at later time
When removeChild is called to remove that div, the contentDocument of the iframe seems to loose its "designMode" property (in fact that contentDocument is null)

WORKAROUND:

tk gave the workaround of destroying/re-creating the toolbar, and manually calling postCreate after the dialog is shown. This causes flickers, and maybe additional issues.
The code is present in the HTML file, it just needs to be uncommented

Attachments (1)

bug_014.html (1.4 KB) - added by guest 12 years ago.
Linked HTML file. Can be placed at the top a dojo hierarchy (ie: above the dijit directory) to locally reproduce the issue

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by guest

Attachment: bug_014.html added

Linked HTML file. Can be placed at the top a dojo hierarchy (ie: above the dijit directory) to locally reproduce the issue

comment:1 Changed 12 years ago by tk

Cc: tk added

Just a tab more info on things tried... I've tried killing all the plugin buttons in Toolbar, manually recreating them to "reconnect" their functions since none of the toolbar buttons affect the editor if you toggle designMode by hand... this had no effect... (delete editor._plugins and editor.plugins then rebuilt from src)

I've tried calling editor.close/open() (oddly enough I think this found another bug) -- doing this destroys the toolbar... and it never creates it, even with subsequent .open() calls

tried calling editor.startup, editor.toolbar.startup() the only effective solution was what is covered in the opening of this ticket...

-Karl

comment:2 Changed 12 years ago by bill

Milestone: 2.0

comment:3 Changed 12 years ago by alex

Milestone: 2.01.3

Milestone 2.0 deleted

comment:4 Changed 11 years ago by bill

Description: modified (diff)
Milestone: 1.31.5
Summary: Programmatically created Editors cannot be added to DialogsEditor: programmatically created Editors cannot be added to Dialogs

comment:5 Changed 9 years ago by bill

Milestone: 1.5future

comment:6 Changed 9 years ago by Douglas Hays

Milestone: future1.5
Resolution: fixed
Status: newclosed

This seems to be working now. Starting with [14713]/1.2, you could edit inside a Dialog but the toolbar was still not displayed correctly, and then finally with [21747]/1.5, the toolbar is working correctly.

Note: See TracTickets for help on using tickets.