Opened 13 years ago

Last modified 10 years ago

#8140 confirmed Bug

Preceeding newline lost when Alignment button is pressed in ENTER_BR

Reported by: Freddie Bingham 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 (6)

comment:1 Changed 13 years ago by Freddie Bingham

Version: 3.6.1

comment:2 Changed 13 years ago by Jakub Ś

Status: newconfirmed
Version: 3.6.13.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 13 years ago by Freddie Bingham

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 12 years ago by Jakub Ś

rev [6624] has also broken #8743

comment:6 Changed 10 years ago by Marek Lewandowski

PR#27 still needs some work, as it causes issue with iterator described in a PR comment.

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