Ticket #2057: 2057.patch
| File 2057.patch, 1.0 kB (added by martinkou, 5 months ago) |
|---|
-
editor/_source/internals/fckselection_ie.js
239 239 this.SelectionData = range ; 240 240 } 241 241 242 FCKSelection._GetSelectionDocument = function( selection ) 243 { 244 var range = selection.createRange() ; 245 if ( !range ) 246 return null; 247 else if ( range.item ) 248 return FCKTools.GetElementDocument( range.item( 0 ) ) ; 249 else 250 return FCKTools.GetElementDocument( range.parentElement() ) ; 251 } 252 242 253 FCKSelection.Restore = function() 243 254 { 244 255 if ( this.SelectionData ) … … 247 258 248 259 try 249 260 { 261 // Don't repeat the restore process if the editor document is already selected. 262 if ( this._GetSelectionDocument( FCK.EditorDocument.selection ) == FCK.EditorDocument ) 263 return ; 250 264 this.SelectionData.select() ; 251 265 } 252 266 catch ( e ) {}