Ticket #6662 (closed Bug: fixed)

Opened 4 years ago

Last modified 8 months ago

Lists copied from Word are not pasted properly.

Reported by: satya Owned by: garry.yao
Priority: Normal Milestone: CKEditor 3.5.3
Component: Plugin : Paste from Word Version:
Keywords: IBM Firefox Cc: damo, joek, james, c, lynne_kues@…

Description

Copy the lists from the Attached document and paste in to the Editor using Paste from Word dialog.

Issue 1:

when we have pasteFromWordRemoveFontStyles & pasteFromWordRemoveStyles set to true Numbered and bulleted lists are pasted properly but they are shown as paragraphs instead of list items.when you keep the cursor in one of the list items Numbered/Bulleted list icons are not highlighted.

keep the cursor at the end of one of the list item and press Enter

Expected Result: A new List item should be started.

Actual Result: A new Paragraph is started.

Issue 2:

when we have pasteFromWordRemoveFontStyles & pasteFromWordRemoveStyles set to false Numbers & bullets for the top level list items are missing.when you keep the cursor in one of the list items Numbered/Bulleted list icons are not highlighted.

keep the cursor at the end of one of the list item and press Enter

Expected Result: A new List item should be started.

Actual Result: A new Paragraph is started.

I am attaching Screenshot of the 2 issues.

Attachments

This is a line of text.doc (27.0 KB) - added by satya 4 years ago.
lists not pasted properly numbers & bullets missing from top level lists issue2.jpg (8.8 KB) - added by satya 4 years ago.
lists pasted properly but shown as paragraphs issue1.jpg (39.1 KB) - added by satya 4 years ago.
6662.patch (3.2 KB) - added by tobiasz.cudnik 4 years ago.
6662.docx (11.0 KB) - added by garry.yao 4 years ago.
6662_2.patch (5.1 KB) - added by tobiasz.cudnik 4 years ago.
6662_3.patch (5.1 KB) - added by tobiasz.cudnik 4 years ago.
bullets.docx (10.7 KB) - added by lynne_kues 4 years ago.
6662_4.patch (1.5 KB) - added by garry.yao 4 years ago.
6662_5.patch (2.6 KB) - added by garry.yao 4 years ago.
6662_6.patch (2.3 KB) - added by garry.yao 4 years ago.

Change History

Changed 4 years ago by satya

comment:1 Changed 4 years ago by garry.yao

  • Keywords Firefox added
  • Status changed from new to confirmed
  • Component changed from General to Core : Pasting
  • Milestone set to CKEditor 3.4.3

Two issues are all due to a recent Firefox update that cause list paste stops working now, we're still under investigation.

comment:2 Changed 4 years ago by tobiasz.cudnik

  • Owner set to tobiasz.cudnik
  • Status changed from confirmed to assigned

comment:3 Changed 4 years ago by garry.yao

Bug is reported at Mozilla.

Changed 4 years ago by tobiasz.cudnik

comment:4 Changed 4 years ago by tobiasz.cudnik

  • Status changed from assigned to review

This patch fixes attached TC and 2 different ones i've checked. It tries to reuse existing filter mechanisms to reduce new code size.

Additionally one list merging bug has been fixed (L412).

Changed 4 years ago by garry.yao

comment:5 Changed 4 years ago by garry.yao

  • Status changed from review to review_failed

The structure detecting approach proposed by the patch is quite unstable, attaching the document that doesn't work with it.

Changed 4 years ago by tobiasz.cudnik

comment:6 Changed 4 years ago by tobiasz.cudnik

  • Status changed from review_failed to review

The margin-to-indentation logic causes problems with the attached document. I've aligned a list creation way with a list destruction, so now we have better results, although it's still not perfect.

Changed 4 years ago by tobiasz.cudnik

comment:7 follow-up: ↓ 19 Changed 4 years ago by tobiasz.cudnik

I've added support for the "MsoListParagraph" class, which lack of caused problems with Office 2010, although i can't yet check it, as i'm missing access to this version. But it should work.

comment:8 Changed 4 years ago by garry.yao

  • Keywords HasPatch added
  • Milestone changed from CKEditor 3.4.3 to CKEditor 3.5.1

We should hold with this ticket as we've already had active communication result from Mozilla on this issue and it has a high possibility of getting fixed by them.

comment:9 Changed 4 years ago by garry.yao

  • Status changed from review to review_failed

As the fix is already landed on MineField, we should simply add one code path to detect "mso-list:Ignore" as in what we did in IE.

comment:10 Changed 4 years ago by lynne_kues

  • Cc james, c, lynne_kues@… added; james c removed

Changed 4 years ago by lynne_kues

comment:11 Changed 4 years ago by lynne_kues

In addition to list items being transformed to <p> tags, we are also seeing issues with margins not being preserved and bullets not transforming properly. Open the bullets.docx attachment, select all, copy, paste into FF editor. List item margins are not maintained, bullets are not transformed properly. FF 3.6.12. If this is not the same issue, let me know, and I will open a separate defect. Thanks.

comment:12 Changed 4 years ago by tobiasz.cudnik

I cannot verify that this has been fixed in FF 3.6.14 pre, i think we still need a patch if this won't be included in 3.x release line.

@lynne_kues: your problems and included TC doc seems related to this one.

Changed 4 years ago by garry.yao

comment:13 Changed 4 years ago by garry.yao

  • Owner changed from tobiasz.cudnik to garry.yao
  • Status changed from review_failed to review

I cannot verify that this has been fixed in FF 3.6.14 pre,

The Mozilla fix arrives in only FF4, and this regression works fine before FF3.6, so I guess the best option for us is just to have a patch for FF4.

comment:14 Changed 4 years ago by wwalc

  • Milestone changed from CKEditor 3.5.1 to CKEditor 3.5.2

Just a note that the third patch provided by Tobiasz does not work with bullets.docx.

comment:15 Changed 4 years ago by Saare

  • Status changed from review to review_passed

comment:16 Changed 4 years ago by garry.yao

  • Status changed from review_passed to closed
  • Keywords HasPatch removed
  • Resolution set to fixed

Fixed with [6545], hopefully we have FF4 very soon.

comment:17 Changed 4 years ago by satya

This issue is not fixed. I could still reproduce the issues on nightly build.

comment:18 Changed 4 years ago by fredck

  • Status changed from closed to reopened
  • Resolution fixed deleted

Having this fixed for FF4 only is not a solution. FF3 will still be with us for some good time.

Changed 4 years ago by garry.yao

comment:19 in reply to: ↑ 7 Changed 4 years ago by garry.yao

  • Status changed from reopened to review

Replying to tobiasz.cudnik:

I've added support for the "MsoListParagraph" class...

Let's consider this a fall back approach for FF3.6.

comment:20 Changed 4 years ago by fredck

  • Status changed from review to review_failed

It's nice to see that a FF3 workaround was not so hard to have. At least for basic support.

There is just one issue with the patch though. We have an empty try/catch at line 1133 now. I think it's by mistake.

Changed 4 years ago by garry.yao

comment:21 Changed 4 years ago by garry.yao

  • Status changed from review_failed to review

comment:22 Changed 4 years ago by fredck

  • Status changed from review to review_passed

comment:23 Changed 3 years ago by garry.yao

  • Status changed from review_passed to closed
  • Resolution set to fixed

Fixed with [6585].

comment:24 Changed 3 years ago by satya

This issue is still reproducible on latest version of firefox 3.6.15 or 3.6.16. Could you please re open this ticket

comment:25 Changed 3 years ago by garry.yao

As said it's not a fully functional solution on FF3.x, please open new tickets for any other findings instead.

comment:26 Changed 8 months ago by fredck

  • Component changed from Core : Pasting to Plugin : Paste from Word
Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy