Changeset 2145

Show
Ignore:
Timestamp:
2008-06-26 11:48:43 (21 months ago)
Author:
martinkou
Message:

Fixed #2322 : Fixed the issue where the fit window command loses the current selection and scroll position in the editing area.

Location:
FCKeditor/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/commandclasses/fckfitwindow.js

    r2052 r2145  
    3737        var eBodyStyle                  = eBody.style ; 
    3838        var eParent ; 
     39 
     40        // Save the current selection and scroll position. 
     41        var oRange = new FCKDomRange( FCK.EditorWindow ) ; 
     42        oRange.MoveToSelection() ; 
     43        var oEditorScrollPos = FCKTools.GetScrollPosition( FCK.EditorWindow ) ; 
    3944 
    4045        // No original style properties known? Go fullscreen. 
     
    161166 
    162167        FCK.Focus() ; 
     168 
     169        // Restore the selection and scroll position of inside the document. 
     170        oRange.Select() ; 
     171        FCK.EditorWindow.scrollTo( oEditorScrollPos.X, oEditorScrollPos.Y ) ; 
    163172} 
    164173 
  • FCKeditor/trunk/_whatsnew.html

    r2144 r2145  
    6262                        where the show blocks command loses the current selection from the view area when editing 
    6363                        a long document.</li> 
     64                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2322">#2322</a>] Fixed the issue 
     65                        where the fit window command loses the current selection and scroll position in the 
     66                        editing area.</li> 
    6467        </ul> 
    6568        <p>