Opened 9 years ago

Last modified 9 years ago

#12641 confirmed Bug

Firefox merges paragraphs with wrong style

Reported by: BM Bulgaria Owned by:
Priority: Normal Milestone:
Component: Core : Editable Version: 3.0
Keywords: Firefox Cc:

Description

In CK demo paste this source code in the source area of the CK editor:

<div style="background:#eee;border:1px solid #ccc;padding:5px 10px;">AAAA</div>

<div style="background:#AAA;border:3px solid #ccc;padding:5px 10px;">BBBB</div>

as the first row is the style "Special container" and the second is the same style with modified color and border. Go to the end of the "AAAA" string and click "Del". Then "BBBB" is merged into the same paragraph, but the paragraph gets the style of "BBBB" instead of "AAAA".

If there is more than one paragraph style in the style combo with surrounding <div></div> the bug is present, but as the the demo such second style lacks, typing it in the source area gives us the same effect.

Only FF. Chrome and IE seem to work correctly - they take the style from the "AAAA" text.

Change History (3)

comment:1 Changed 9 years ago by BM Bulgaria

Version: 4.3.3

comment:2 Changed 9 years ago by Jakub Ś

Keywords: Firefox added
Status: newconfirmed
Version: 4.3.33.0

THis is how Firefox handles it. If you use below code in FF you will get same result.

<div style="margin:20px; border:1px solid black; width:500px;" contenteditable="true">
<div style="background:#eee;border:1px solid #ccc;padding:5px 10px;">AAAA</div>
<div style="background:#AAA;border:3px solid #ccc;padding:5px 10px;">BBBB</div>
</div>

I'm confirming this issue because editor should at least try to make it work the same in all browsers.

comment:3 Changed 9 years ago by Piotrek Koszuliński

CKEditor already handles blocks merging on Blink and Webkit due to #9998 and does it in the same way as here would expect. So the second block is always merged in to the first one, while on FF that inconsistent and depends on block types.

We didn't have time for that while working on #9998, but I would like to use the algorithms which we wrote for Blink and Webkit also for other browsers, so the behaviour will be totally consistent on all browsers.

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