Opened 11 years ago

Last modified 11 years ago

#9476 confirmed Bug

CKEDITOR.dialog#disableButton not working

Reported by: Jeff Fournier Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: HasPatch Cc:


It is still possible to click on a dialog button after having disabling it with the disableButton method in CKEDITOR.dialog (

When "disableButton" is called, the property "disabled" is correctly set to true and a css class is added to the button. But if you click on the button, there's no check to see if it's disabled and the event is still fired.

I think this could be fixed by modifying the code in _source/plugin/dialogui/plugin.js and adding a check for disabled before the onClick is applied.

Like this :

(line 949)

onClick : function( dialog, func )
    this.on( 'click', function()
            // Some browsers (Chrome, IE8, IE7 compat mode) don't move
            // focus to clicked button. Force this.
            func.apply( this, arguments );

By the way, the css class (cke_disabled) added to the button when it's disabled does nothing and the button doesn't look disabled.

Change History (3)

comment:1 Changed 11 years ago by Jeff Fournier

To reproduce just add this onClick() code to any button in a dialog.

  type : 'button',
  id : 'btnTest',
  label : 'test',
  onClick : function() 
    var dialog = this.getDialog();

comment:2 Changed 11 years ago by Jeff Fournier

Component: UI : DialogsGeneral

comment:3 Changed 11 years ago by Jakub Ś

Keywords: HasPatch added
Status: newconfirmed

It looks like cke_disabled is added but click still works.

Problem can be reproduced from CKEditor 3.0.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy