Changes between Initial Version and Version 1 of Ticket #8331, comment 3


Ignore:
Timestamp:
Feb 21, 2013, 10:33:00 PM (11 years ago)
Author:
Chris Ingham
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #8331, comment 3

    initial v1  
    1 Add to Cc: inghamc
     1Until this ticket is resolved, the following works for me (as of version 4.0.1.1):
     2
     3
     4{{{
     5CKEDITOR.on('dialogDefinition', function(dialogDefinitionEvent) {
     6//if ('link' == dialogDefinitionEvent.data.name) {
     7      var dialogDefinition = dialogDefinitionEvent.data.definition;
     8      // Get rid of annoying confirmation dialog on cancel
     9      dialogDefinition.dialog.on('cancel', function(cancelEvent) {
     10          return false;
     11      }, this, null, -1);
     12    //}
     13});
     14}}}
     15
     16The commented '''if''' statement that would limit the confirmation removal to just the ''link'' dialog.
     17
     18The '''-1''' argument sneakily* inserts this cancel handler before the ''dialog'' plugin's default handler, which will never be invoked by returning '''false'''.
     19
     20*thanks to alfonsoml for his 2009 blog post
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy