Changeset 7560
- Timestamp:
- 07/12/12 18:50:55 (10 months ago)
- Location:
- CKEditor/trunk/_source
- Files:
-
- 2 edited
-
core/dom/range.js (modified) (2 diffs)
-
plugins/selection/plugin.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/trunk/_source/core/dom/range.js
r7538 r7560 1844 1844 } 1845 1845 1846 // Antecipate the trim() call here, so the walker will not make1847 // changes to the DOM, which would not get reflected into this1848 // range otherwise.1849 this.trim();1850 1851 1846 // We need to grab the block element holding the start boundary, so 1852 1847 // let's use an element path for it. … … 1877 1872 return false; 1878 1873 } 1879 1880 // Antecipate the trim() call here, so the walker will not make1881 // changes to the DOM, which would not get reflected into this1882 // range otherwise.1883 this.trim();1884 1874 1885 1875 // We need to grab the block element holding the start boundary, so -
CKEditor/trunk/_source/plugins/selection/plugin.js
r7556 r7560 280 280 // than firing the selection change event. 281 281 282 var saved Bookmark,282 var savedRange, 283 283 saveEnabled, 284 284 restoreEnabled = 1; … … 295 295 296 296 // Give the priority to locked selection since it probably 297 // reflects the actual situation. (#6083, #6987) 297 // reflects the actual situation, besides locked selection 298 // could be interfered because of text nodes normalizing. 299 // (#6083, #6987) 298 300 var lockedSelection = doc.getCustomData( 'cke_locked_selection' ); 299 301 if ( lockedSelection ) … … 304 306 // Then check ff we have saved a range, restore it at this 305 307 // point. 306 else if ( saved Bookmark&& restoreEnabled )308 else if ( savedRange && restoreEnabled ) 307 309 { 308 var range = doc.getSelection().getNative().createRange();309 range.moveToBookmark( savedBookmark );310 310 // Well not break because of this. 311 try { range.select(); } catch (e) {}312 saved Bookmark= null;311 try { savedRange.select(); } catch (e) {} 312 savedRange = null; 313 313 } 314 314 }); … … 540 540 } 541 541 542 // Create an IE Range bookmark to defeat possible text node normalization. 543 try { savedBookmark = nativeSel && nativeSel.createRange().getBookmark(); } 544 catch(er){} 542 savedRange = nativeSel && sel.getRanges()[ 0 ]; 545 543 546 544 checkSelectionChangeTimeout.call( editor ); … … 1454 1452 this.reset(); 1455 1453 1456 doc.getBody().focus();1457 1458 1454 if ( selectedElement ) 1459 1455 this.selectElement( selectedElement );
Note: See TracChangeset
for help on using the changeset viewer.
