Opened 6 years ago

Closed 3 years ago

#8520 closed Bug (fixed)

IE8 Paste throws errors in <br> mode

Reported by: Freddie Bingham Owned by: Garry Yao
Priority: Normal Milestone:
Component: Core : Pasting Version: 3.6.2
Keywords: IE Cc: piotr.grzyb@…

Description

  1. Load http://nightly.ckeditor.com/7309/_samples/enterkey.html
  2. Change Enter mode mode to "Break the line with a <BR>";
  3. Click in Editor
  4. Highlight "sample text"
  5. Press CTRL-C, CTRL-V

Note the javascript error that is thrown. The issue seems to happen with any paste action when text is highlighted.

Note that this does not happen in IE8 mode of IE9. Only native IE8 is afflicted.

Attachments (1)

8520.patch (3.0 KB) - added by Garry Yao 6 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 6 years ago by Jakub Ś

Keywords: IE8 added; ie8 removed
Status: newconfirmed
Version: 3.6.2

Reproducible form CKEditor 3.6.2 rev [7239]

comment:2 Changed 6 years ago by Jakub Ś

Keywords: IE7 added

Another TC this time reroducible in IE8 - IE6 and enter mode set to BR is not needed.

Issue has been reproducible in IE8 - IE6 from CKEditor 3.6.2 rev [7239]

To reproduce:

  1. Open replace by code sample
  2. Select word "some"
  3. Press Copy toolbar button. When prompted to allow clipboard access click yes.
  4. Select word "using"
  5. Press toolbar button "Paste as plain text" or "Paste from word or "Paste". When prompted to allow clipboard access click yes

Result: JS error is thrown.
In IE8
Message: Invalid argument
Line: 241
URI: /3.6.2/ckeditor/_source/core/dom/node.js

In IE7 and IE6
Message: Invalid argument
Line: 241
URI: /3.6.2/ckeditor/_source/plugins/selection/plugin.js

Last edited 6 years ago by Jakub Ś (previous) (diff)

comment:3 Changed 6 years ago by Jakub Ś

#8538 was marked as duplicate

comment:4 Changed 6 years ago by Jakub Ś

Keywords: IE added; IE8 IE7 removed

Changed 6 years ago by Garry Yao

Attachment: 8520.patch added

comment:5 Changed 6 years ago by Garry Yao

Owner: set to Garry Yao
Status: confirmedreview

IE used a transient bookmark node (~) in DOM internally during the paste operation, which breaks the our selection range retrieval logic.

This is some <STRONG>sample text</STRONG>. You are some~<A href="http://ckeditor.com/" data-cke-saved-href="http://ckeditor.com/">CKEditor</A>

The patch fix the selection system by traversing through child nodes when possible instead of relying on a sibling reference.

comment:6 Changed 6 years ago by Fiery

I have applied the patch, bug still exists. Select any text, right click-Copy, right click-Paste.

Exception appears in line 797 in selection/plugin.js (line number after patching):

return { container : child, offset : child.nodeValue.length };

child.nodeValue throws InvalidArgument exception.

comment:7 Changed 5 years ago by Jakub Ś

#9202 was marked as duplicate.

comment:8 Changed 5 years ago by Nick Poppelreiter

I'd like to try out this patch, but it's written for 3.6.2, and I'm using 3.6.4. Plugin.js has changed enough in 3.6.4 that It's hard to apply the patch. Any chance of getting an updated version of the patch?

comment:9 Changed 4 years ago by piotr.grzyb

Cc: piotr.grzyb@… added

comment:10 Changed 3 years ago by Jakub Ś

I wasn't able to reproduce this problem in latest CKEditor 4.4.2 anymore.

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

Resolution: fixed
Status: reviewclosed

I can't reproduce it too. It's very likely that we fixed this issue in CKEditor 4.0 when custom HTML insertion algorithm was introduced. I closed number of similar issues after that.

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