Ticket #6615: 6615_3.patch
File 6615_3.patch, 1.9 KB (added by , 13 years ago) |
---|
-
_source/plugins/tableresize/plugin.js
161 161 162 162 var leftSideCells, rightSideCells, leftShiftBoundary, rightShiftBoundary; 163 163 164 var savedRange; 165 function toggleDesignMode( state ) 166 { 167 document.getBody().$.contentEditable = !!state; 168 } 169 164 170 function detach() 165 171 { 166 172 pillar = null; … … 171 177 resizer.removeListener( 'mousedown', onMouseDown ); 172 178 resizer.removeListener( 'mousemove', onMouseMove ); 173 179 180 needsIEHacks && toggleDesignMode( 1 ); 174 181 document.getBody().setStyle( 'cursor', 'auto' ); 175 182 176 183 // Hide the resizer (remove it on IE7 - #5890). … … 278 285 { 279 286 cancel( evt ); 280 287 288 if ( needsIEHacks ) 289 { 290 toggleDesignMode( 1 ); 291 savedRange = document.$.selection.createRange(); 292 } 293 281 294 resizeStart(); 282 295 283 296 document.on( 'mouseup', onMouseUp, this ); … … 288 301 evt.removeListener(); 289 302 290 303 resizeEnd(); 304 305 if ( needsIEHacks && savedRange ) 306 setTimeout( function() { savedRange.select(); }, 0 ); 307 291 308 } 292 309 293 310 function onMouseMove( evt ) … … 331 348 }); 332 349 333 350 // In IE6/7, it's not possible to have custom cursors for floating 334 // elements in an editable document. Show the resizer in that case, 335 // to give the user a visual clue. 336 needsIEHacks && resizer.setOpacity( 0.25 ); 351 // elements in an editable document. 352 needsIEHacks && toggleDesignMode(); 337 353 338 354 resizer.on( 'mousedown', onMouseDown, this ); 339 355 … … 437 453 } 438 454 439 455 var pillar = getPillarAtPosition( pillars, evt.$.clientX ); 440 if ( pillar ) 456 457 // Skip mouse drag/drop/selection. 458 if ( pillar && !evt.$.button ) 441 459 { 442 460 !resizer && ( resizer = new columnResizer( editor ) ); 443 461 resizer.attachTo( pillar );