Ticket #3728 (closed Bug: fixed)
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
Change History
comment:2 Changed 3 years ago by martinkou
- Owner set to martinkou
- Status changed from new to assigned
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.
comment:9 Changed 3 years ago by fredck
- Keywords Review? added; Review- removed
- Status changed from new to assigned
comment:11 Changed 3 years ago by fredck
- Status changed from assigned to closed
- Resolution set to fixed
Fixed with [3688].

