Opened 12 years ago
Last modified 11 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
- Clear editor contents with new page
- Press Bulleted list button
- Type test
- Press Shift+Enter
- Press Enter
- Repeat steps 3-5 few times.
- Press Ctrl+A and Ctrl+C
- Clear editor contents with New Page command
- 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].
Change History (12)
comment:1 Changed 12 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 12 years ago by
comment:3 Changed 12 years ago by
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:5 Changed 12 years ago by
Milestone: | → CKEditor 4.2.1 |
---|
comment:6 Changed 12 years ago by
Owner: | set to Piotr Jasiun |
---|---|
Status: | confirmed → assigned |
comment:7 Changed 12 years ago by
Status: | assigned → review |
---|
The problem was because these br
were considered as bogus and removed. I've added rule to maybeBogus
to leave then.
- git: t/10378
- tests: t/10378
comment:8 Changed 11 years ago by
Status: | review → review_failed |
---|
The fix is a way too specific if restricted to lists only. Consider the following case:
- New page.
- Type "Foo"
- Shift-enter.
- Enter.
- Type "Bar"
- C-a, C-c
- New page
- C-v
Expected (i.e. how does it look in Webkit):
<p>Foo<br /> </p> <p>Bar</p>
Actual (IE):
<p>Foo</p> <p>Bar</p>
comment:9 Changed 11 years ago by
Status: | review_failed → review |
---|
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.
comment:10 Changed 11 years ago by
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 11 years ago by
Milestone: | CKEditor 4.2.1 |
---|---|
Status: | review → review_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>
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.
Please note that before [6624] it was not possible to insert empty line between list items