#6946 closed Bug (fixed)
[IE] copy and paste lists from own document leads into invalid lists
Reported by: | Syslogic | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.5.3 |
Component: | Core : Parser | Version: | 3.5 |
Keywords: | IE | Cc: |
Description
When copying and pasting lists in the CKEditor lists end up malformed in Internet Explorer (7 and 8).
Test setup:
- Add code below
<p> Paragraph before</p> <ul> <li> First item</li> <li> Second item</li> <li> Third item</li> <li> Fourth item</li> </ul> <p> Paragraph after</p>
- copy the second and the third item and paste it below the last paragraph.
Now the bullets are gone. Visually it looks like one paragraph with between the two items a <br />
- Press the Code button. The code definitely doesn't look like what was expected: The items are not in an <ul> tag.
- Press the Code button again. The document is changed compared to the contents which was in the CKEditor before toggling the Code view.
- Press the Code button again. The code now represents the end result of the paste action.
When pasting a subset of a list, the new pasted data should be wrapped in a <ul> tag in order to create valid code.
Attachments (10)
Change History (24)
Changed 14 years ago by
Attachment: | 01 start-situation.png added |
---|
Changed 14 years ago by
Attachment: | 04 corrected-after-code-view.png added |
---|
The corrected view after toggling the Code button
Changed 14 years ago by
Attachment: | 05 code-corrected.png added |
---|
The code representing the corrected view
comment:1 Changed 14 years ago by
Keywords: | IE added; IE7 IE8 lists removed |
---|---|
Status: | new → confirmed |
Changed 14 years ago by
Attachment: | 6946.patch added |
---|
comment:2 Changed 14 years ago by
Component: | Core : Pasting → Core : Parser |
---|---|
Owner: | set to Garry Yao |
Status: | confirmed → review |
Changed 14 years ago by
Attachment: | 6946_2.patch added |
---|
comment:5 Changed 14 years ago by
Milestone: | → CKEditor 3.5.2 |
---|
comment:6 Changed 14 years ago by
Status: | review → review_failed |
---|
Put in source:
<dl><dd>a</dd><dt>b</dt></dl>
Toggle to wysiwyg and back to source.
Expected:
<dl> <dd> a</dd> <dt> b</dt> </dl>
Result:
<dl> <dd> a <dl> <dt> b</dt> </dl> </dd> </dl>
Changed 14 years ago by
Attachment: | 6946_3.patch added |
---|
comment:7 Changed 14 years ago by
Status: | review_failed → review |
---|
Beyond addressing this particular issue, the patch is a simplification rewrite of the parse's DOM constructing logic, all current TCs regard parsing have to be verified.
comment:8 Changed 14 years ago by
Status: | review → review_failed |
---|
Insert:
<ul><ol></ul>
Expected result:
<ul> <li> <ol> </ol> </li> </ul>
Actual result:
<ul> <li> <ol> </ol> </li> <li> <ol> </ol> </li> </ul>
Changed 14 years ago by
Attachment: | 6946_4.patch added |
---|
comment:9 Changed 14 years ago by
Status: | review_failed → review |
---|
comment:10 Changed 14 years ago by
Status: | review → review_failed |
---|
Insert:
<li>1</li> <dt>2</dt> <dd>3</dd>
Expected:
<ul> <li> 1</li> </ul> <dl> <dt> 2</dt> <dd> 3</dd> </dl>
Actual:
<dl> <dt> 2</dt> <dd> 3</dd> </dl>
(List item is left out)
Changed 14 years ago by
Attachment: | 6946_5.patch added |
---|
comment:11 Changed 14 years ago by
Status: | review_failed → review |
---|
It's quite a tricky case, but we should be able to handle it : two times of invalid fixing.
While the correct expected result is a bit counterintuitive perhaps, but it should be instead, as the dl is invalid inside ul thus are lifted above it.
<dl><dt>2</dt></dl><ul><li>1</li></ul>
comment:12 Changed 14 years ago by
Status: | review → review_passed |
---|
comment:13 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with [6561], thanks Saar for hq review.
comment:14 Changed 14 years ago by
I've added a few TCs for the cases found here with [6641].
One of the tests is not passing because the expectation explained on comment:11 is wrong. The one in comment:10 is definitely what we must have.
Start situation