Ticket #7910 (closed Bug: fixed)

Opened 3 years ago

Last modified 5 months ago

If forcePasteAsPlainText paste (ctrl + v) doesn't work properly in webkit env

Reported by: aorduno Owned by:
Priority: Normal Milestone:
Component: General Version: 3.6
Keywords: Webkit Cc:

Description

I'm working with forcePasteAsPlainText = true and when i paste something using ctrl + v in webkit env (chrome, safari...) and wysiwyg mode i got the same text repeated several times. I checked in the code and i found each time you use the function setData ( e.g. editor.setData('aorduno') ) in wysiwyg plugin you will recreate the iframe. So, for each time i recreate the iframe i got the text pasted once.

If i use two times editor.setData('myData') i recreate the iframe two times and then if i want to paste 'aorduno' using (ctrl + v) i got 'aordunoaorduno' as result. This is working alright in other browsers (ff, ie, opera) the only browsers i got this repeated text pasted are from webkit.

Change History

comment:1 Changed 3 years ago by j.swiderski

  • Status changed from new to confirmed
  • Keywords Webkit added
  • Version set to 3.6

1.On replacebycode.html paste:

setTimeout(function(){
CKEDITOR.instances.editor2.setData( '<p>Some other editor data.</p>', function(){this.checkDirty();});
CKEDITOR.instances.editor2.setData( '<p>Some other editor data 2.</p>', function(){this.checkDirty();});
},2000);
  1. Open replace by code sample and paste some text into second editor.
  2. The text is doubled.

This has always worked in safari and sometimes in Chrome (don't know why)

I could reproduce it only in CKEditor 3.6 and only when I used the code on a page. When I tried to execute it in Chrome or Safari console the text was not doubled.

comment:2 Changed 5 months ago by j.swiderski

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

I wasn't able to reproduce this in CKEditor 4.x.

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