Opened 13 years ago
Closed 12 years ago
#9034 closed Bug (fixed)
IE: Unspecified Error when making a selection in the editor
Reported by: | Teresa Monahan | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.6.4 |
Component: | Core : Selection | Version: | 3.6.3 |
Keywords: | IE7 | Cc: | Damian, Satya Minnekanti |
Description
An 'Unspecified Error' is sometimes thrown when selecting text in the editor. We cannot reproduce this in a standalone testcase, however it happens very often in our application. It happens in IE8 and IE9 when run in IE7 document mode.
The issue happens when you select text by starting the selection at the end of the editor. We believe this is related to the following code in the selection plugin which handles the case where the user clicks below the body.
function onHover( evt ) { evt = evt.data.$; if ( textRng ) { // Read the current cursor. var rngEnd = body.$.createTextRange(); rngEnd.moveToPoint( evt.x, evt.y ); // Handle drag directions. textRng.setEndPoint( textRng.compareEndPoints( 'StartToStart', rngEnd ) < 0 ? 'EndToEnd' : 'StartToStart', rngEnd ); // Update selection with new range. textRng.select(); } }
Adding a try/catch around this code as in the attached patch seems to fix this issue. Can you see any undesired consequences of this patch?
Attachments (5)
Change History (14)
Changed 13 years ago by
Attachment: | 9034.patch added |
---|
comment:1 Changed 13 years ago by
Status: | new → pending |
---|
There should not be issues on holding that code inside try/catch.
In any case, to have us understanding the issue in fully, we definitely need to be able to reproduce it locally. Please let us know if you find any way to do so consistently.
Changed 13 years ago by
Attachment: | IE unspecified error.html added |
---|
comment:2 Changed 13 years ago by
I attached 'IE unspecified error.html' which provides a reproducible test case. The problem occurs when <META content="IE=7.0000" http-equiv="X-UA-Compatible"> is included in the HTML for the page.
Also note that when you click into the editor body, the cursor does not display. However when you start typing, content is entered into the editor.
comment:3 Changed 13 years ago by
Keywords: | IE9 IE8 added |
---|---|
Status: | pending → confirmed |
Version: | 3.6.4 (SVN - trunk) → 3.6.3 |
Reproducible in IE8 and IE9 from CKEditor 3.6.3 rev. [7374]
comment:4 Changed 13 years ago by
Status: | confirmed → pending |
---|
Unable to reproduce the issue on trunk.
Changed 13 years ago by
comment:5 Changed 13 years ago by
Status: | pending → confirmed |
---|
Put ierr.html into ckeditor_trunk/_samples/ and follow steps described in that file.
Changed 13 years ago by
Attachment: | 2012-06-25_1217.swf added |
---|
comment:6 Changed 13 years ago by
Still with ierr.html sample when you click in editor you can't see cursor and js error occurs when executing steps from TC. Check out jing video.
Changed 13 years ago by
Attachment: | 9034_2.patch added |
---|
comment:7 Changed 13 years ago by
Component: | General → Core : Selection |
---|---|
Keywords: | IE7 added; IE9 IE8 IBM removed |
Milestone: | → CKEditor 3.6.4 |
Owner: | set to Garry Yao |
Status: | confirmed → review |
We should be performing a browser version check instead of a document mode check for the fix in place.
comment:8 Changed 12 years ago by
Status: | review → review_failed |
---|
I have no difference with the patch on the provided tc file when testing it with IE9. In fact, the proposed code doesn't make any logical change in that case (ie7Compat==true and version==7).
comment:9 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | review_failed → closed |
It looks like try...catch is the only rescue to it, fixed with [7521].
Proposed fix