Since upgrading to CKEditor 4.0, we noticed that our data buffer can capture odd data. It may be because we transmit the contents of editor.getData() on blur so that we can send it to the server.
Here's a simple trace of an editor as type in A, then overwrite with B, then overwrite with C, and finally overwrite using a PASTE of "Please review to provide the records needed.":
*** TRACE Received HTML (9) >>><p>A</p>
<<<
*** TRACE Received HTML (9) >>><p>B</p>
<<<
*** TRACE Received HTML (9) >>><p>C</p>
<<<
*** TRACE Received HTML (257) >>><p><span style="display: none;"> </span>C<span style="display: none;"> </span></p>
<body id="cke_pastebin" style="position: absolute; top: -6px; width: 1px; height: 218px; overflow: hidden; margin: 0px; padding: 0px; left: -1000px;"> </body>
<<<
*** TRACE Received HTML (52) >>><p>Please review to provide the records needed.</p>
<<<
As you see, before we get the buffer that is correct after the paste, we also see two spans with display:none as well as an odd body tag for cke_pastebin. What might cause the buffer to contain such odd characters we clearly did not enter and then are automatically removed in short order?
I think the PASTE operation is causing a BLUR (we noted that if we even click below the last line of text in the editor window, we get a blur and focus event as if the click loses the focus and then gets it back) and so we are seeing this interim value. It seems that the two empty SPAN tags surround the highlighted text that I then replaced with the PASTE. If we PASTE to just append text rather than also overwrite, we noted only one SPAN is inserted.
It appears to happen on Chrome, Safari and FF, but not IE9 or Opera.
Still under 4.0.1
We noted that this bug still appears in 4.0.1.
Thank you again for your
Thank you again for your message. Could you, however, be so kind as to report the issue on our Development site, as described here? Our QA team can only deal with your issue when it is reported on the tracker. Thanks in advance!
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!
We noted that this bug still
We noted that this bug still appears in 4.0.1.
Ticket 9949 and sample code to reproduces the bug
We reported this under ticket 9949: https://dev.ckeditor.com/ticket/9949
With a discussion that reproduces the bug in the forums here: http://ckeditor.com/comment/123908#comment-123908