Opened 6 years ago

Last modified 5 years ago

#10378 review_failed Bug

IE: empty lines removed from list on copy/paste

Reported by: Jakub Ś Owned by: Piotr Jasiun
Priority: Normal Milestone:
Component: General Version: 3.5.3
Keywords: IE Opera Oracle Cc:

Description

  1. Clear editor contents with new page
  2. Press Bulleted list button
  3. Type test
  4. Press Shift+Enter
  5. Press Enter
  6. Repeat steps 3-5 few times.
  7. Press Ctrl+A and Ctrl+C
  8. Clear editor contents with New Page command
  9. Press Ctrl+V

Result:   and br tags are lost thus new lines get removed.

Problem can be reproduced from CKEditor 3.5.3 rev [6624].

Other tickets caused by this revision: #8743, #8140

Change History (12)

comment:1 Changed 6 years ago by Jakub Ś

Status: newconfirmed

comment:2 Changed 6 years ago by Jakub Ś

Please note that before [6624] it was not possible to insert empty line between list items

comment:3 Changed 6 years ago by Zoltan Koszegi

This issue takes high severity on our (ORACLE) side. Our related question was this:
http://helpdesk.cksource.com/view.php?ticketref=6581-SFHX-7979&pass=kI3Cb0Yu
Version 4.1.1 also affected.

comment:4 Changed 6 years ago by Jakub Ś

Still reproducible in Opera and IE in latest CKEditor 4.1.2

comment:5 Changed 6 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 4.2.1

comment:6 Changed 6 years ago by Piotr Jasiun

Owner: set to Piotr Jasiun
Status: confirmedassigned

comment:7 Changed 6 years ago by Piotr Jasiun

Status: assignedreview

The problem was because these br were considered as bogus and removed. I've added rule to maybeBogus to leave then.

comment:8 Changed 5 years ago by Olek Nowodziński

Status: reviewreview_failed

The fix is a way too specific if restricted to lists only. Consider the following case:

  1. New page.
  2. Type "Foo"
  3. Shift-enter.
  4. Enter.
  5. Type "Bar"
  6. C-a, C-c
  7. New page
  8. C-v

Expected (i.e. how does it look in Webkit):

<p>Foo<br />
&nbsp;</p>

<p>Bar</p>

Actual (IE):

<p>Foo</p>

<p>Bar</p>

comment:9 Changed 5 years ago by Piotr Jasiun

Status: review_failedreview

Ok... it seems to be quite big thing. In all of cases I found <br> at the end of block should not be considered to be bogus so my proposition is it to do it that way.

Because of this modification I had to change also some tests. I checked all of them manually and now they behave better.

I'm talking about IE of course.

Last edited 5 years ago by Piotr Jasiun (previous) (diff)

comment:10 Changed 5 years ago by Olek Nowodziński

As such change looks seriously, it needs Fred's attention. We're gonna wait to know his opinion first before we nuke the entire editor.

comment:11 Changed 5 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 4.2.1
Status: reviewreview_failed

Unfortunately this solution is not good. We do hadle bogus BRs on IE. It happens on data loading, not on editing.

So for example, if we load this data:

<p>a</p>
<p><br></p>
<p>b</p>

The <br> in this case should be treated as a bogus (in the case of IE being removed), because visually speaking that paragraph is rendered as a single line.

With the provide solution it'll be transformed to <br>&nbsp; which makes it rendered as two lines.

The root of the problem is the auto-expansion of lines in IE, where <p><br></p> is rendered as two lines in editing mode. But then when copying and pasting it from the editor, we don't have any information about the source of the data to tell us that that <br> is a real BR instead.

The only solution I see for this is marking good BRs with temporary attributes, so they'll never get confused as bogus, even on copy and paste. This would be an important change though and we don't have ways to accommodate this in the upcoming release any more.

comment:12 Changed 5 years ago by Piotrek Koszuliński

cc

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