Opened 12 years ago

Closed 12 years ago

#9132 closed Bug (fixed)

IE6-8 JS error thrown when pasting with dialog

Reported by: Jakub Ś Owned by:
Priority: Normal Milestone: CKEditor 3.6.5
Component: Core : Pasting Version: 3.6.2
Keywords: IE IBM Cc: monahant@…, satya_minnekanti@…

Description (last modified by Jakub Ś)

I have found it when checking #8849 and #9127.

To reproduce:

  1. Load the "replacebyclass" sample (important);
  2. Select first line and copy/paste it. You should have 7 lines.
  3. Select the bold text "sample text" in third line from the bottom;
  4. Press Tab key to move focus outside of editor;
  5. Click on "Paste" toolbar button; choose to deny clipboard access in order to bring up dialog.
  6. Fill in the dialog with some text "abc" then click on Ok

Result: The above TC produces JS error:

Message: Invalid argument.
Line: 938
URI: /ckeditor/_source/plugins/selection/plugin.js

It has been reproducible (IE6-8) from rev. [7239] to [7382]; got fixed in [7383] and showed up again from [7447] to [7517]; got fixed in [7518] and now has been reproducible from CKEditor [7560]

Guys, Please use CRTL+F5 or clear cache from time to time if you have problems with reproducing.

Attachments (1)

2012-07-13_0858.swf (845.7 KB) - added by Jakub Ś 12 years ago.

Download all attachments as: .zip

Change History (17)

Changed 12 years ago by Jakub Ś

Attachment: 2012-07-13_0858.swf added

comment:1 Changed 12 years ago by Jakub Ś

Status: newconfirmed

comment:2 Changed 12 years ago by Wiktor Walc

Simplified TC (there is no need to create 7 lines), can be constantly reproduced in IE6:

  • load _samples/replacebyclass.html
  • select "sample"
  • press Tab to focus outside of editor
  • click "Paste" button
  • "Do you want to allow this page to (..)?" - answer "No"
  • type abc in the Paste dialog window
  • Result same as above:
     Invalid argument. Line: 938 URI: /ckeditor/_source/plugins/selection/plugin.js
    

comment:3 Changed 12 years ago by Wiktor Walc

Note: in 3.6.3 I'm getting exactly the same error in the same part of code (the line number is a bit different but it's exactly the same place):

if ( sibling.nodeType == CKEDITOR.NODE_TEXT )
{
	container = sibling;
	distance -= sibling.nodeValue.length; // <----------------
}

comment:4 Changed 12 years ago by Jakub Ś

Description: modified (diff)

comment:5 Changed 12 years ago by Wiktor Walc

Version: 3.6.4 (SVN - trunk)3.6.2

To summarize:

  • got broken in [7239] (3.6.2) - broken in 3.6.2 stable
  • got fixed in [7383] (3.6.3 SVN) and broken again in [7447] (3.6.3 SVN) - broken in 3.6.3 stable
  • got fixed in [7518] (3.6.4 SVN) and broken again in [7560] - still broken in 3.6.4

in other words, the issue is reproducible from 3.6.2 when talking about stable releases.

comment:6 Changed 12 years ago by Teresa Monahan

Cc: monahant@… added
Keywords: IBM added

comment:7 Changed 12 years ago by Satya Minnekanti

Cc: satya_minnekanti@… added

adding myself to cc

comment:8 Changed 12 years ago by Teresa Monahan

I can reproduce this consistently in IE8 without even tabbing out of the editor:

  • Load any sample and type some text.
  • Select a word.
  • Click the "Paste" button
  • "Do you want to allow this page to (..)?" - answer "No"
  • Type content in the Paste dialog window and press Ok.

Error:

Message: Invalid argument.
Line: 133
Char: 986
Code: 0
URI: http://nightly.ckeditor.com/7566/ckeditor.js

When run with ckeditor_source.js from trunk instead, I get an error when I try to open the paste dialog and cannot complete the testcase. This error is:

Message: Invalid argument.
Line: 233
Char: 4
Code: 0
URI: file:///C:/cksource/CKEditor/trunk/_source/core/dom/node.js

comment:9 Changed 12 years ago by Damian

I cannot reproduce on Windows 7 and IE9 in IE8 browser mode. I have only seen it reproduced on native IE8.

comment:10 Changed 12 years ago by Garry Yao

Resolution: fixed
Status: confirmedclosed

Fixed with [7585].

comment:11 Changed 12 years ago by Garry Yao

Milestone: CKEditor 3.6.5

comment:12 in reply to:  10 Changed 12 years ago by Teresa Monahan

Replying to garry.yao:

Fixed with [7585].

We still get a JavaScript error after this fix with the following steps:

  • Load any sample and type some text.
  • Select a word from right to left i.e. start the selection at the end of the word.
  • Click the "Paste" button
  • "Do you want to allow this page to (..)?" - answer "No"
  • Type multiple lines of content in the Paste dialog and press Ok.

comment:13 Changed 12 years ago by Satya Minnekanti

Could you please re-open the ticket based on teresa's reply in Comment 12. We could still reproduce the issue that teresa mentioned in comment 12

comment:14 Changed 12 years ago by Jakub Ś

Resolution: fixed
Status: closedreopened

Fix for this original TC in this ticket is valid but it does not fix the TC presented in comment:12.

TC from comment:12 has been reproducible in IE6-8 the same history as original TC:

  • got broken in [7239] (3.6.2) - broken in 3.6.2 stable
  • got fixed in [7383] (3.6.3 SVN) and broken again in [7447] (3.6.3 SVN) - broken in 3.6.3 stable
  • got fixed in [7518] (3.6.4 SVN) and broken again in [7560] - still broken in 3.6.4

JS error is:
Message: Invalid argument.
Line: 62
URI: /ckeditor/_source/core/dom/text.js


IMO the fix presented in [7585] is incomplete thus I'm reopening this ticket.

I also think that when providing new fix one should check if #9116 and #8978 won't get broken again.

comment:15 Changed 12 years ago by Jakub Ś

Status: reopenedconfirmed

comment:16 Changed 12 years ago by Garry Yao

Component: GeneralCore : Pasting
Resolution: fixed
Status: confirmedclosed

Fixed the second TC mentioned in 12 with [7605].

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy