Opened 9 years ago
Last modified 9 years ago
#14598 confirmed Bug
Order of style properties is changed when inserting content
Reported by: | Papillon | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.1 |
Keywords: | Cc: |
Description
Steps to reproduce
Insert a new element with insertHtml(). The inline style contains a border and a border-top property (in this order):
<div style="border:none; border-top:solid #E1E1E1 1.0pt;"></div>
(see https://jsfiddle.net/Papillon/h6w4w1ah/, click on the insert content button)
The inserted element should have a top border, since this property was defined last. I belive content filtering reverses the properties, so the element gets no border.
Expected result
<div style="border:none; border-top:solid #E1E1E1 1.0pt;"></div>
The element should have a top border.
Actual result
<div style="border-top:solid #E1E1E1 1.0pt; border:none; "></div>
The element has no top border.
Other details (browser, OS, CKEditor version, installed plugins)
Chrome 49, Firefox 45, CKEditor standard package
When trying standard package styles are indeed changed. When using full package everything is fine.
After some checking it has turned out that removing
div
plugin causes the problem:@Papillon to work around this issue please add div plugin to your standard package.
This particular problem (style switch) can be reproduced from CKEditor 4.4. Between CKEditor 4.1 -4.3.5 above configuration was entering empty div. Before version 4.1 styles were inserted properly despite div plugin being removed.