Changeset 1818
- Timestamp:
- 2008-03-27 09:57:34 (4 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/_source/internals/fckselection_ie.js
r1805 r1818 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 { … … 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 }