Changeset 547

Show
Ignore:
Timestamp:
2007-07-26 10:33:53 (16 months ago)
Author:
martinkou
Message:

Fixed #539 : Fixed the issue where right clicking on a table inside the editor would cause the editor to scroll to the top.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/classes/fckpanel.js

    r404 r547  
    5353 
    5454                if ( this._Window == window.parent && window.frameElement ) 
     55                { 
     56                        var scrollPos = null ; 
     57                        if ( FCKBrowserInfo.IsGecko && FCK && FCK.EditorDocument ) 
     58                                scrollPos = [ FCK.EditorDocument.body.scrollLeft, FCK.EditorDocument.body.scrollTop ] ; 
    5559                        window.frameElement.parentNode.insertBefore( oIFrame, window.frameElement ) ; 
     60                        if ( scrollPos ) 
     61                        { 
     62                                var restoreFunc = function() 
     63                                { 
     64                                        FCK.EditorDocument.body.scrollLeft = scrollPos[0] ; 
     65                                        FCK.EditorDocument.body.scrollTop = scrollPos[1] ; 
     66                                } 
     67                                setTimeout( restoreFunc, 500 ) ; 
     68                        } 
     69                } 
    5670                else 
    5771                        this._Window.document.body.appendChild( oIFrame ) ;