Opened 6 years ago

Last modified 5 years ago

#11601 confirmed Bug

FF - Pasting Chinese characters adds spaces to the pasted text

Reported by: Lynne Kues Owned by:
Priority: Normal Milestone:
Component: Core : Pasting Version: 3.1
Keywords: Firefox IBM Cc: irinauru@…

Description

Firefox

Customer is complaining about spaces being inserted when pasting text in the editor.

To recreate:

Copy the following text. Paste it into the demo editor. Select and copy the text within the editor. Enter a few lines and paste the text again. You will see a space being added to the pasted text. See attachment.

该交易由登记或新办理发起。客户初次办理出口保理额度预申请或正式申请需要分别对进口商、出口商的相关信息进行补充录入。经办确认后,进、出口商信息按各分 行存储在本地,下次交易时输入进、出口商编号后可以直接调用。如果第二次录入时对原进、出口商信息有所更改,则新信息覆盖原信息。不同分行间信息独立存 储,不相互影响。出口商信息保存:栏位33-50.进口商信息保存:栏位61-73。

Attachments (2)

paste.png (8.5 KB) - added by Lynne Kues 6 years ago.
screen capture of problem
2014-02-24_1100.swf (1.3 MB) - added by Jakub Ś 6 years ago.
Steps to reproduce this issue.

Download all attachments as: .zip

Change History (13)

Changed 6 years ago by Lynne Kues

Attachment: paste.png added

screen capture of problem

comment:1 Changed 6 years ago by Irina

This is a customer reported issue. Can you please prioritize it for the 4.3.4 release?

comment:2 Changed 6 years ago by Irina

Cc: irinauru@… added

Changed 6 years ago by Jakub Ś

Attachment: 2014-02-24_1100.swf added

Steps to reproduce this issue.

comment:3 Changed 6 years ago by Piotrek Koszuliński

cc

comment:4 Changed 6 years ago by Jakub Ś

Seems problem can be reproduced from CKEditor 3.1 rev. [4774] in Firefox only.

To reproduce (watch the video and read below steps):

  1. Copy text from the ticket (opened in Firefox)
  2. Go to editor and remove all text e.g. with New Page button.
  3. Paste text you have copied
  4. Press Ctrl+A, Ctrl+C (*Copy current text from editor), click behind selected text or press right arrow and press Enter
  5. Type 2 lines of text
  6. Paste Ctrl+V to paste text you have in your clapboard

Result: space will be added between characters


  • I have been trying to reproduce this with native contenteditoable but no luck.
  • I have also tried to play around with CSS (adding CKE styles to native or removing styles from CKE) but also no luck. It has worked.
  • I had an impression that this ticket has started in CKE 3.3.2 [5646] but it has turned out that is revision is just scayt autostartup disabled and that really problem can be reproduced from CKE 3.1. What is weird is that scayt starting with editor has somehow fixed this issue.

comment:5 Changed 6 years ago by Jakub Ś

Keywords: Firefox added
Status: newconfirmed
Version: 3.6.6 (SVN - trunk)3.1

comment:6 Changed 6 years ago by Piotrek Koszuliński

I think that this may be a problem with charset in the wysiwygarea. I could not reproduce this issue in inline editor.

comment:7 in reply to:  6 Changed 6 years ago by Piotrek Koszuliński

Replying to Reinmar:

I think that this may be a problem with charset in the wysiwygarea. I could not reproduce this issue in inline editor.

Nope... False alarm. Kuba was able to reproduce this on inline editor as well.

Another interesting clue can be found using plugins/clipboard/dev/clipboard.html sample which shows that there are strange new lines character appearing in the pasted string.

HTML copied from this ticket:

该交易由登记或新办理发起。客户初次办理出口保理额度预申请或正式申请需要分别对进口商、出口商的相关信息进行补充录入。经办确认后,进、出口商信息按各\n分 \n行存储在本地,下次交易时输入进、出口商编号后可以直接调用。如果第二次录入时对原进、出口商信息有所更改,则新信息覆盖原信息。不同分行间信息独立存 \n储,不相互影响。出口商信息保存:栏位33-50.进口商信息保存:栏位61-73。\n

HTML copied from this ticket, pasted to CKEditor and copied again:

该交易由登记或新办理发起。客户初次办理出口保理额度预申请或正式申请需要分别对进口商、出口商的相关信息进行补充录入。经办确认后,进、出口商信\n息按各 分 \n行存储在本地,下次交易时输入进、出口商编号后可以直接调用。如果第二次录入时对原进、出口商信息有所更改,则新信息覆盖原信息。不同分行间信息独立存 \n储,不相互影响。出口商信息保存:栏位33-50.进口商信息保存:栏位61-73。 

The first pasted HTML is copied directly from this ticket. There are couple of new line characters there what's strange considering that there are none in in the source HTML of this ticket. But they are ok, because they appear in places where originally were spaces.

However, after copying that text from CKEditor new lines appear in different places than before, this time between characters which originally were standing next to each other. This can be observed even when not pasting into CKEditor, but pasting data copied from CKEditor to native contenteditable. That data will be broken because of that new lines which renders as spaces.

Since CKEditor does not control copying, it's Firefox's behaviour to put those new line characters. We couldn't reproduce this issue on native contenteditable, but there may be an unrelated trigger for it, so we may not be able to find it. However, we have to report this issue to Mozilla.

comment:8 Changed 6 years ago by Jakub Ś

This can be observed even when not pasting into CKEditor, but pasting data copied from CKEditor to native contenteditable.

The problem I see is that when I copy from native contenteditable and paste is into native contenteditable problem doesn't occur. It seems in order to reproduce it you need to use editor thus I would hold on with reporting this to Mozilla just yet.

comment:9 Changed 6 years ago by Piotrek Koszuliński

Right, but we do nothing when browser copies text on CTRL+C. So if the copied text is displayed correctly and pasted text is incorrect, then it's a browser bug. I can't find any reason why would Firefox have to insert new line characters in the text.

comment:10 Changed 5 years ago by Lynne Kues

Could you give an update on this ticket? This issue was reported by one of our customers and we need to have some type of resolution for the issue. Is this a FF defect?

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

I think that it's a Firefox defect. In comment:7 I described what happens when copy&paste this string - new lines are being inserted at positions where there should be no whitespaces (in the middle of words). However, I wasn't able to reproduce the same on raw contenteditable, so I couldn't report it. The trigger for this issue is still unknown, though it's very unlikely that CKEditor could do something like that.

We can give it a try one more time, but I don't think we'll be able to find why these new lines appear. I can also report it this way, but I don't think it will receive a proper attention from Firefox's developers in such case.

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