Opened 12 years ago
Closed 12 years ago
#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 (1)
Change History (3)
Changed 12 years ago by
Attachment: | UNotFunction.JPG added |
---|
comment:2 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
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' );
When double clicked on DIV element, the error is displayed.