Ticket #8140 (confirmed Bug)

Opened 3 years ago

Last modified 14 months ago

Preceeding newline lost when Alignment button is pressed in ENTER_BR

Reported by: fbingha Owned by:
Priority: Normal Milestone:
Component: General Version: 3.5.3
Keywords: Cc:

Description

I am seeing this in, at least, IE8 and FF3.6

  1. Enable ENTER_BR mode
  2. Type a few chars (or not, doesn't matter)
  3. Press "Enter" two times.
  4. Press "Align Left" or "Align Center" or "Align Right"

Note that the cursor jumps up one space, causing the loss of one of the newlines.

The cursor should not jump when an alignment button is used.

Change History

comment:1 Changed 3 years ago by fbingha

  • Version set to 3.6.1

comment:2 Changed 3 years ago by j.swiderski

  • Status changed from new to confirmed
  • Version changed from 3.6.1 to 3.5.3

I’m not sure if this is a bug.

In Firefox, Opera and Webkit pressing Enter key two times creates 3 <br> tags, pressing alignment afterwards creates (from CKE version 3.5.1)

<br />
<div style="text-align: center;">
	&nbsp;</div>

Two br tags are simply replaced with div.
Before CKE version 3.5.1 pressing alignment button created different results depending on CKE version.

In IE browsers pressing Enter two times creates 2 <br> tags. Pressing alignment afterwards creates the same result as above from CKEditor version 3.5.3 rev [6624].
Before CKE version 3.5.3 pressing alignment button created different results depending on CKE version.

comment:3 Changed 3 years ago by fbingha

If we enter a bit of text, then two breaks, then center, then some text, the expectation is that we will still have that newline between the text. It may not work this way in ENTER_P using shift break, as all of the text gets centered, but in ENTER_BR we expect it to work this way.

Note, that the end result is correct in ENTER_DIV, the space between the text is preserved as no <div> is removed whereas in ENTER_BR one of the <br> is removed.

comment:4 Changed 2 years ago by j.swiderski

rev [6624] has also broken #8743

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy