Ticket #2322: 2322.patch
File 2322.patch, 1.6 KB (added by , 15 years ago) |
---|
-
_whatsnew.html
54 54 has pressed the Source button.</li> 55 55 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2314">#2314</a>] Corrected 56 56 mixed up Chinese translations for the blockquote command.</li> 57 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2322">#2322</a>] Fixed the issue 58 where the fit window command loses the current selection and scroll position in the 59 editing area.</li> 57 60 </ul> 58 61 <p> 59 62 <a href="_whatsnew_history.html">See previous versions history</a></p> -
editor/_source/commandclasses/fckfitwindow.js
37 37 var eBodyStyle = eBody.style ; 38 38 var eParent ; 39 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 ) ; 44 40 45 // No original style properties known? Go fullscreen. 41 46 if ( !this.IsMaximized ) 42 47 { … … 160 165 FCK.EditingArea.MakeEditable() ; 161 166 162 167 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 ) ; 163 172 } 164 173 165 174 FCKFitWindow.prototype.GetState = function()