Opened 10 years ago

Last modified 10 years ago

#10940 confirmed Bug

[FF] contenteditable false prevents removing line breaks

Reported by: Matt Butler Owned by:
Priority: Normal Milestone:
Component: General Version: 3.5.1
Keywords: Cc:

Description (last modified by Jakub Ś)

When a tag with contenteditable=false is directly preceded by a BR, P, or DIV tag said tags cannot be removed.

<br />
<span contenteditable='false'>test</span>

I can occasionally click the margin to the left of the span and backspace the BR, but it's not dependable. It cannot be deleted from the end of the previous line at all. Deleting the SPAN will also delete the BR. Adding any printable character between the BR and SPAN will allow the BR to be removed.

Tested in chrome and firefox.
It IS working is IE8 of all browsers...

This issue is only valid for TC mentioned in comment:1 for Firefox. In all other cases editor does the same thing as native code in browser does.

Problem occurs in both CKE 3.x and 4.x (4.2.1 at the time of writing)

Change History (2)

comment:1 Changed 10 years ago by Jakub Ś

Status: newpending
Version: 4.2.1

This behaviour can be observed from CKEditor 3.0 and in fact it can be observed without editor. This is native browser behaviour.

  • In IE it is possible to remove BR (CKE and native)
  • In Blink and Webkit whole element gets removed (CKE and native)
  • In FF this is complicated. In native code whole span gets removed but in editor (starting from CKE 3.5.1) pressing delete when having cursor in line with BR causes nothing. Elements path is changing to BODY P BR and it is impossible to remove Span. This IMO is the only thing that can be considered a bug.
    If you put cursor in SPAN, elements path will show BODY P SPAN. Press Up and Down arrow to get out of SPAN boundaries and press backspace. It then works. Please note this is no editor bug but FF weird feature.
	<br />
	<span contenteditable="false">test</span></p>


After disscussing this with @Reinmar I will confirm this issue.


  1. Insert below code
    	<br />
    	<span contenteditable="false">test</span></p>
  2. Put cursor in first line and press delete
  3. Cursor disappears, elements path shows you are inside BR and you have to click in content area again.

Problem can only be reproduced in Firefox from CKEditor 3.5.1 rev. [6373]

Last edited 10 years ago by Jakub Ś (previous) (diff)

comment:2 Changed 10 years ago by Jakub Ś

Description: modified (diff)
Status: pendingconfirmed
Summary: contenteditable false prevents removing line breaks[FF] contenteditable false prevents removing line breaks
Version: 3.5.1
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