Ticket #3728 (closed Bug: fixed)

Opened 3 years ago

Last modified 3 years ago

Automatic color options don't seem to do anything

Reported by: damo Owned by: fredck
Priority: Normal Milestone: CKEditor 3.0
Component: General Version:
Keywords: IBM Confirmed Review+ Cc:

Description

The Font color and Background color toolbar options provide an "Automatic" selection. Based on the way that FCKEditor 2.6 has implemented this option, it should reset the background/font color. This doesn't appear to work in the nightly CKEditor builds.

Attachments

3728.patch Download (843 bytes) - added by martinkou 3 years ago.
3728_2.patch Download (560 bytes) - added by fredck 3 years ago.

Change History

comment:1 Changed 3 years ago by martinkou

  • Keywords Confirmed added

comment:2 Changed 3 years ago by martinkou

  • Owner set to martinkou
  • Status changed from new to assigned

Changed 3 years ago by martinkou

comment:3 Changed 3 years ago by martinkou

  • Keywords Review? added

This is due to some missing logic in colorbutton plugin.

comment:4 Changed 3 years ago by garry.yao

  • Keywords Review- added; Review? removed

I think you fixing is somehow conflicting with the existing logic there:

					if ( color )
						style.apply( editor.document );
					else
						style.remove( editor.document );

So the correct fix would either remove the current colored style OR apply the inherited style.

comment:5 Changed 3 years ago by martinkou

  • Keywords Review? added; Review- removed

There's no conflict there. If the color is to be removed, then color would be null and thus style.remove() is executed. What's missing is that we need to detect the color to be removed before running style.remove(), and that's what my patch does.

comment:6 Changed 3 years ago by garry.yao

  • Keywords Review+ added; Review? removed

Sorry, my fault, doesn't get the idea of your patch.

comment:7 Changed 3 years ago by fredck

  • Keywords Review- added; Review+ removed

The proposed patch doesn't work on mixed colors selection.

comment:8 Changed 3 years ago by fredck

  • Owner changed from martinkou to fredck
  • Status changed from assigned to new

It looks like it was just a small misunderstanding in the original implementation. I've a new patch for it.

Changed 3 years ago by fredck

comment:9 Changed 3 years ago by fredck

  • Keywords Review? added; Review- removed
  • Status changed from new to assigned

comment:10 Changed 3 years ago by martinkou

  • Keywords Review+ added; Review? removed

comment:11 Changed 3 years ago by fredck

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixed with [3688].

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