Opened 13 years ago
Closed 13 years ago
#8691 closed Bug (fixed)
[IE] Browser crash when pasting certain content
Reported by: | Damian | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.6.3 |
Component: | Core : Pasting | Version: | 3.1 |
Keywords: | IBM IE | Cc: | satya_minnekanti@… |
Description
When pasting certain HTML content from an application like IBM Sametime into CKEditor, the browser will crash. This is consistently reproducible.
This issue was originally reported against IE8 by a customer.
When testing in IE9, switch the "Document Mode" to "IE7 Standards". It does not appear to crash in other document modes.
The crash usually occurs in plugins/selection/plugin.js line 1719 on the call to ieRange.select() or an earlier line with the same call:
.... else { this.setEndBefore( endNode ); endNode.remove(); 1719 -> ieRange.select(); } this.document.fire( 'selectionchange' ); ....
To reproduce:
- Copy a snippet of a chat log from IBM Sametime. Alternatively, the clipboard HTML data flavor has been attached to this ticket.
- Use CTRL+A in CKEditor, then CTRL+V to paste
Result: the browser crashes
Attachments (4)
Change History (16)
Changed 13 years ago by
Attachment: | 8691 - Clipboard HTML.txt added |
---|
comment:1 Changed 13 years ago by
Cc: | satya_minnekanti@… added |
---|
comment:2 Changed 13 years ago by
Changed 13 years ago by
Attachment: | HTMLClipboard.xls added |
---|
Helper tool to populate system clipboard
comment:3 Changed 13 years ago by
Keywords: | IE7 IE6 added |
---|---|
Status: | new → confirmed |
Version: | → 3.1 |
This is the reduced code for 8961- Clipboard HTML.txt file. (Please see testfile.html)
<html> <body> <style type='text/css'> body { overflow:hidden; } </style> <html> <head> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <table> <td nowrap width="120px" style="width:120px; white-space:nowrap" class="other">..</td><td width="330px" style="width:330px"><span class="left" style="font-size: 8pt; font-family: Tahoma; color: rgb(0, 0, 0);">thx</span></td><td> </td> </table> </body> </html> </body> </html>
To reproduce the ticket:
- Open this file in IE7 or IE6, press CRTL+A, CRTL+C
- Use CTRL+A in CKEditor (on its contents), then CTRL+V to paste
Result:
Browser will crash.
This issue has only been reproducible in IE7 and IE6 from CKEditor 3.1
Why this ticket is not valid for IE9 and IE8
As you can see above this is quite not up to standards HTML. All in all it should not break the browser. Well and it doesn't - If you set IE9 to IE7 document mode manually then you will break the browser but if you do it the proper way, that is set <meta http-equiv="X-UA-Compatible" content="IE=7" />
in E.g. fullpage.html sample, open this page in IE9/IE8 and then paste invalid HTML the browser will not break.
comment:4 Changed 13 years ago by
If IE8 or IE9 is set to load pages in Compatibility View, this issue will be reproducible, even with the meta tag set. To reproduce this, in IE9 or IE8 go to menu Tools->Compatibility Views settings and ensure the compatibility view setting will be set for the given page.
comment:5 Changed 13 years ago by
If IE8 or IE9 is set to load pages in Compatibility View
@damo this is still using developer tools.
Anything related to the IE Developer Tools is to be ignored as we don't support it. Only "real pages" can be used for testing and to the confirm issues - X-UA-Compatible is the only acceptable way for it.
To summarize - This ticket is valid for IE7 and IE6 but not for IE8 and Ie9.
comment:6 Changed 13 years ago by
As long as this is fixed to work properly in native IE7, I would then expect it to work in IE8+ as well, with Compatibility View turned on. The X-UA-Compatible header does not affect this setting in the IE8+ browsers.
Changed 13 years ago by
Attachment: | 8691.patch added |
---|
comment:7 Changed 13 years ago by
Component: | General → Core : Pasting |
---|---|
Owner: | set to Frederico Caldeira Knabben |
Status: | confirmed → review |
comment:9 Changed 13 years ago by
Status: | review → review_failed |
---|
Let's try to figure out a patch without using timeout since that would defer the real insertion happens even further which may break other things.
Changed 13 years ago by
Attachment: | 8691_2.patch added |
---|
comment:10 Changed 13 years ago by
Owner: | changed from Frederico Caldeira Knabben to Garry Yao |
---|---|
Status: | review_failed → review |
New patch reorder a bit the bookmark selection which should be enough to eliminate the browser crash.
comment:11 Changed 13 years ago by
Milestone: | → CKEditor 3.6.3 |
---|---|
Status: | review → review_passed |
comment:12 Changed 13 years ago by
Keywords: | IE added; IE7 IE6 removed |
---|---|
Resolution: | → fixed |
Status: | review_passed → closed |
Fixed with [7383].
I believe I have narrowed down the problem to the following clipboard data:
Specifically, the overflow:hidden in the style.
To reproduce the problem, you can use the VBA form found inside the attached Excel file. It was created using the instructions from Microsoft here http://support.microsoft.com/kb/274308