Ticket #8520 (review Bug)

Opened 2 years ago

Last modified 11 months ago

IE8 Paste throws errors in <br> mode

Reported by: fbingha 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

8520.patch (3.0 KB) - added by garry.yao 2 years ago.

Change History

comment:1 Changed 2 years ago by j.swiderski

  • Keywords IE8 added; ie8 removed
  • Status changed from new to confirmed
  • Version set to 3.6.2

Reproducible form CKEditor 3.6.2 rev [7239]

comment:2 Changed 2 years ago by j.swiderski

  • 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 2 years ago by j.swiderski (previous) (diff)

comment:3 Changed 2 years ago by j.swiderski

#8538 was marked as duplicate

comment:4 Changed 2 years ago by j.swiderski

  • Keywords IE added; IE8 IE7 removed

Changed 2 years ago by garry.yao

comment:5 Changed 2 years ago by garry.yao

  • Owner set to garry.yao
  • Status changed from confirmed to review

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 2 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 20 months ago by j.swiderski

#9202 was marked as duplicate.

comment:8 Changed 20 months ago by nickp

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 11 months ago by piotr.grzyb

  • Cc piotr.grzyb@… added
Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy