Opened 13 years ago

Last modified 11 years ago

#6977 confirmed Bug

about override in styles

Reported by: yiminghe Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version: 3.0
Keywords: HasPatch Cc:

Description

steps: 1.open www.ckeditor.com/demo 2.switch to source mode,input html:

<p>
	12345678<font style="background-color: rgb(130, 130, 130);">xyzabcd</font>9012345678</p>

3.switch to wysiwyg mode and place cursor between 'y' and 'z', then click background button , select '自动'

  1. expected:

'xyzabcd' does not have background-color.

actual result :

unchanged

5.select '8xyzabcd9' ,then click background button ,select red color

  1. expected :

generate code :

<p>
	1234567<span style="background-color: rgb(255, 0, 0);">8xyzabcd9</span>012345678</p>

actual code (too bloated):

<p>
	1234567<span style="background-color: rgb(255, 0, 0);">8</span><font style="background-color: rgb(130, 130, 130);"><span style="background-color: rgb(255, 0, 0);">xyzabcd</span></font><span style="background-color: rgb(255, 0, 0);">9</span>012345678</p>

ps:in trunk ,result is error :

<p>
	1234567<span style="background-color: rgb(255, 0, 0);">8<font style="background-color: rgb(130, 130, 130);">xyzabcd</font>9</span>012345678</p>

ps2: i provide a patch for trunk, add consideration about override element's style

Attachments (1)

override.patch (8.4 KB) - added by yiminghe 13 years ago.

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by yiminghe

Attachment: override.patch added

comment:1 Changed 13 years ago by Krzysztof Studnik

Keywords: override style background-color removed
Status: newconfirmed

Result in Chrome, IE and Opera (nothing is done with RGB with decimal values, new values are in hex):

<p>
	1234567<span style="background-color:#ff0000;">8<font style="background-color: rgb(130, 130, 130);">xyzabcd</font>9</span>012345678</p>

Result in Firefox 3.6

<p>
	1234567<span style="background-color: rgb(255, 0, 0);">8<font style="background-color: rgb(130, 130, 130);">xyzabcd</font>9</span>012345678</p>

Until CKEditor v3.5.1 (rev from 2011.01.11) result was:

<p>
	1234567<span style="background-color:#ff0000;">8</span><font style="background-color: rgb(130, 130, 130);"><span style="background-color:#ff0000;">xyzabcd</span></font><span style="background-color:#ff0000;">9</span>012345678</p>

comment:2 Changed 13 years ago by Krzysztof Studnik

Keywords: HasPatch? added

comment:3 Changed 13 years ago by Krzysztof Studnik

#6976 is DUP/Related

comment:4 Changed 13 years ago by Garry Yao

Version: 3.5.1 (SVN - trunk)3.0

comment:5 Changed 12 years ago by Jakub Ś

Keywords: HasPatch added; HasPatch? removed

comment:6 Changed 11 years ago by Jakub Ś

This ticket should be considered as part of #4505 which talks about styles merging

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy