- // It's much simpler for IE8, we just need to reselect the reported range.\r
- if ( CKEDITOR.env.ie8 )\r
- {\r
- html.on( 'mouseup', function( evt )\r
+ evt = evt.data;\r
+\r
+ // We're sure that the click happens at the region\r
+ // outside body, but not on scrollbar.\r
+ if ( evt.getTarget().is( 'html' ) &&\r
+ evt.$.x < html.$.clientWidth &&\r
+ evt.$.y < html.$.clientHeight )\r
+ {\r
+ // Start to build the text range.\r
+ var textRng = body.$.createTextRange();\r
+ moveRangeToPoint( textRng, evt.$.x, evt.$.y );\r
+ // Records the dragging start of the above text range.\r
+ var startRng = textRng.duplicate();\r
+\r
+ html.on( 'mousemove', onHover );\r
+ outerDoc.on( 'mouseup', onSelectEnd );\r
+ html.on( 'mouseup', onSelectEnd );\r
+ }\r
+ });\r
+ }\r
+\r
+ // It's much simpler for IE > 8, we just need to reselect the reported range.\r
+ if ( CKEDITOR.env.ie8 )\r