Opened 6 years ago

Last modified 5 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)

cke_disabled.gif (3.8 KB) - added by Teresa Monahan 6 years ago.

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by Teresa Monahan

Attachment: cke_disabled.gif added

comment:1 Changed 5 years ago by Jakub Ś

Status: newconfirmed
Version: 3.6.3 (SVN - trunk)3.0

It has been working that way from CKEditor 3.0.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy