Changeset 1818

Show
Ignore:
Timestamp:
2008-03-27 09:57:34 (2 years ago)
Author:
martinkou
Message:

Fixed #2057 : Fixed flicking in IE when FCK.InsertHtml() is called with long contents.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/internals/fckselection_ie.js

    r1805 r1818  
    240240} 
    241241 
     242FCKSelection._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 
    242253FCKSelection.Restore = function() 
    243254{ 
     
    248259                try 
    249260                { 
     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 ; 
    250264                        this.SelectionData.select() ; 
    251265                }