Ticket #9081 (closed Bug: invalid)
U is not a function error
| Reported by: | krishnank | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | UI : Dialogs | Version: | 3.6.2 |
| Keywords: | Cc: | knimmagadda@… |
Description
The following code displays "U is a not a function" error in the browser (firefox).
CKEDITOR.on( 'instanceReady', function( ev ) {
ev.editor.on( 'doubleclick', function( event ) {
var r=event.data.element; if(r.is('div')) {
var dialogObj =
new CKEDITOR.dialog(CKEDITOR.instances.editor1 , 'pomaccordion' );
dialogObj.show();
}
});
});
Attachments
Change History
Changed 11 months ago by krishnank
- Attachment UNotFunction.JPG added
comment:1 Changed 11 months ago by krishnank
When double clicked on DIV element, the error is displayed.
comment:2 Changed 11 months ago by j.swiderski
- Status changed from new to closed
- Resolution set to invalid
Dialogs are lazy loaded so your code will only work if smiley dialog was loaded into editor before running this code.
Instead of
var dialogObj = new CKEDITOR.dialog(CKEDITOR.instances.editor1 , 'pomaccordion' ); dialogObj.show();
you should use
event.editor.execCommand( 'pomaccordion'); or event.editor.openDialog( 'pomaccordion' );
Note: See
TracTickets for help on using
tickets.

When double clicked on DIV element, the error is displayed.