Ticket #9132 (closed Bug: fixed)
IE6-8 JS error thrown when pasting with dialog
| Reported by: | j.swiderski | 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 j.swiderski) (diff)
I have found it when checking #8849 and #9127.
To reproduce:
- Load the "replacebyclass" sample (important);
- Select first line and copy/paste it. You should have 7 lines.
- Select the bold text "sample text" in third line from the bottom;
- Press Tab key to move focus outside of editor;
- Click on "Paste" toolbar button; choose to deny clipboard access in order to bring up dialog.
- 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
Change History
comment:2 Changed 10 months ago by wwalc
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 10 months ago by wwalc
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:5 Changed 10 months ago by wwalc
- Version changed from 3.6.4 (SVN - trunk) to 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:8 Changed 10 months ago by tmonahan
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 10 months ago by damo
I cannot reproduce on Windows 7 and IE9 in IE8 browser mode. I have only seen it reproduced on native IE8.
comment:10 follow-up: ↓ 12 Changed 10 months ago by garry.yao
- Status changed from confirmed to closed
- Resolution set to fixed
Fixed with [7585].
comment:12 in reply to: ↑ 10 Changed 10 months ago by tmonahan
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 10 months ago by satya
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 10 months ago by j.swiderski
- Status changed from closed to reopened
- Resolution fixed deleted
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:16 Changed 9 months ago by garry.yao
- Status changed from confirmed to closed
- Component changed from General to Core : Pasting
- Resolution set to fixed
