Ticket #8677 (confirmed Bug)

Opened 3 years ago

Last modified 3 years ago

cke_disabled class is not added to the span for a disabled dialog button

Reported by: tmonahan Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: IBM Cc: damo, satya

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

cke_disabled.gif (3.8 KB) - added by tmonahan 3 years ago.

Change History

Changed 3 years ago by tmonahan

comment:1 Changed 3 years ago by j.swiderski

  • Status changed from new to confirmed
  • Version changed from 3.6.3 (SVN - trunk) to 3.0

It has been working that way from CKEditor 3.0.

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