Opened 13 years ago
Last modified 13 years ago
#8677 confirmed Bug
cke_disabled class is not added to the span for a disabled dialog button
Reported by: | Teresa Monahan | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | IBM | Cc: | Damian, Satya Minnekanti |
Description
The dialogui plugin defines a disable function for CKEDITOR.ui.dialog.button objects.
/** * Disables the button. * @example */ disable : function() { this._.disabled = true; this.getElement().addClass( 'cke_disabled' ); },
This function adds the cke_disabled class to this.getElement() which corresponds to the a tag for the button. Therefore the a tag can be styled using this class when the button is disabled. However, the cke_disabled class is not added to the span tag which displays the label for the button (see the attached screen capture). Therefore, there is no way to style the text for disabled buttons.
The disable function should be updated to also add the cke_disabled class to the span tag. Perhaps doing something like this:
disable : function() { this._.disabled = true; this.getElement().addClass( 'cke_disabled' ); if(this.getElement().getChildCount() > 0 && this.getElement().getChild(0).getName() == 'span'){ this.getElement().getChild(0).addClass('cke_disabled'); } },
The enable function would need to be updated accordingly to remove the cke_disabled class from the span when the button is enabled again.
Attachments (1)
Change History (2)
Changed 13 years ago by
Attachment: | cke_disabled.gif added |
---|
comment:1 Changed 13 years ago by
Status: | new → confirmed |
---|---|
Version: | 3.6.3 (SVN - trunk) → 3.0 |
It has been working that way from CKEditor 3.0.