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.
(As reported in the forums: http://ckeditor.com/forums/Support/span-
displaynone-and-body-idckepastebin-appearing-in-buffer)
--
Ticket URL: <http://dev.ckeditor.com/ticket/9949>
CKEditor <http://ckeditor.com/>
The text editor for the Internet
* status: new => pending
Comment:
And again:
This it not enough information.
1. Which editor do you use 3.x or 4.x (I assume the second but please
confirm)? We had similar issues some time ago #5144, #6382, #9549 but they
were all fixed. Are yu using some old editor?
2. Could you provide reduced sample showing the problem (I'm talking about
same html page that can be put in samples folder and will show the
problem)?[[BR]]
3. Could you provide detailed steps that explain how to reproduce this
problem?
4. Can this be reproduced in plain and fresh CKEditor without any
customizations or this problem occur in your webapp or in customized
editor?
Please reply to all questions.
--
Ticket URL: <http://dev.ckeditor.com/ticket/9949#comment:1>
Comment (by open-esignforms):
Yes, this is under 4.0.1. I saw those bug reports, yet I still see it
occur.
Sadly, I doubt this can be reproduced in the demo editor because it needs
to act on the 'blur' event where it retrieves the editor.getData() to see
it. The editor contents have the buggy contents only for a brief time,
but long enough to be there when we retrieve it in the blur event handler
where we ship the contents back to the server.
I suspect it has something to do with "force blur" since the editor
already defaults to having a 100msec delay on emitting the blur event, as
if there's a known issue with quick blur-then-focus events firing so that
they do not occur unless the 'nodelay' option is used.
In 3.x we used this to make blur be forceBlur:
CKEDITOR.focusManager.prototype['blur'] =
CKEDITOR.focusManager.prototype['forceBlur'];
In 4.0.1 we're doing this to simulate that:
CKEDITOR.focusManager.prototype.orig_blur =
CKEDITOR.focusManager.prototype.blur;
CKEDITOR.focusManager.prototype.blur = function() {
CKEDITOR.focusManager.prototype.orig_blur.call(this,true); };
--
Ticket URL: <http://dev.ckeditor.com/ticket/9949#comment:2>
* status: pending => closed
* version: 4.0.1 =>
* resolution: => invalid
Comment:
>>The editor contents have the buggy contents only for a brief time
Why not adding setTimeout? It is possible that for a brief of time there
are some browser leftovers which CKEditor cleans. In such case setting
delay seems like a good solution.
Taking the above into account I assume that this problem can't be
reproduced in plain CKEditor without any custom changes or plugins thus I
will have to close it as invalid. [[BR]]
If this issue is valid, could you please provide reduced sample showing
the problem (I'm talking about same html page that can be put in samples
folder and will show the problem) or piece of code with description where
should be put or custom plugin. I will reopen this ticket then.
--
Ticket URL: <http://dev.ckeditor.com/ticket/9949#comment:3>
Comment (by open-esignforms):
It's probably related to ticket 9948 and the example there. If the force
blur concept is no longer a valid scenario (in which you will see the
extra focus/blur events firing), then both 9948 and this ticket are
invalid.
But it seems to me that the blur/focus events are firing, just being
suppressed by the fact that blur waits 100msecs (a number that sounds
arbitrary and was used because it seems to hold true, but in fact may not
hold true depending on the browser type, speed, load, etc. of the client).
It would be better if the blur/focus events didn't fire at all unless the
editor actually loses/gains focus since a PASTE and right-click in a TABLE
CELL should not cause either event to fire it would seem to me.
--
Ticket URL: <http://dev.ckeditor.com/ticket/9949#comment:4>
Comment (by open-esignforms):
Please see forum posting:
http://ckeditor.com/comment/123908#comment-123908
This shows the issue with blur/focus not firing correctly, buffer
mismatches, etc. using just CKEditor in HTML.
--
Ticket URL: <http://dev.ckeditor.com/ticket/9949#comment:5>