Ticket #5778: 5778.patch
File 5778.patch, 1.4 KB (added by , 14 years ago) |
---|
-
_source/plugins/selection/plugin.js
172 172 }); 173 173 } 174 174 175 var scroll; 175 176 // IE fires the "selectionchange" event when clicking 176 177 // inside a selection. We don't want to capture that. 177 body.on( 'mousedown', disableSave ); 178 body.on( 'mousedown', function( evt ) 179 { 180 // IE scrolls document to top on right mousedown 181 // when editor has no focus, remember this scroll 182 // position and revert it before context menu opens. (#5778) 183 if ( evt.data.$.button == 2 ) 184 { 185 var sel = editor.document.$.selection; 186 if ( sel.type == 'None' ) 187 scroll = editor.window.getScrollPosition(); 188 } 189 190 disableSave(); 191 }); 178 192 body.on( 'mouseup', 179 function( )193 function( evt ) 180 194 { 195 // Restore recorded scroll position when needed on right mouseup. 196 if ( evt.data.$.button == 2 && scroll ) 197 { 198 editor.document.$.documentElement.scrollLeft = scroll.x; 199 editor.document.$.documentElement.scrollTop = scroll.y; 200 } 201 202 scroll = null; 181 203 saveEnabled = true; 182 204 setTimeout( function() 183 205 {