Ticket #4829: 4829.patch
File 4829.patch, 1.2 KB (added by , 13 years ago) |
---|
-
_source/plugins/selection/plugin.js
105 105 editor.on( 'contentDom', function() 106 106 { 107 107 var doc = editor.document, 108 win = editor.window.$, 108 109 body = doc.getBody(); 109 110 110 111 if ( CKEDITOR.env.ie ) … … 143 144 } 144 145 }); 145 146 146 editor.window.on( 'focus', function()147 body.on( 'focus', function() 147 148 { 148 149 // Enable selections to be saved. 149 150 saveEnabled = true; … … 189 190 // event. 190 191 doc.on( 'selectionchange', saveSelection ); 191 192 193 // IE doesn't fire "selectionchange" when manipulate selection manually, 194 // compensate the native function with selection saving logic. (#4829) 195 win.TextRange.prototype.select = 196 CKEDITOR.tools.override( win.TextRange.prototype.select, function( org ) 197 { 198 return function() 199 { 200 org.apply( this, arguments ); 201 saveSelection(); 202 }; 203 }); 204 192 205 function disableSave() 193 206 { 194 207 saveEnabled = false;