X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fmaximize%2Fplugin.js;h=a3a260a6e4462974ee410bd01d60d525ab847593;hp=4c4054471b7b54452d3bbc6edad2b6f00e886036;hb=941b0a9ba4e673e292510d80a5a86806994b8ea6;hpb=7cd80714081a8ffdf4a1a8d2c72f120ed5ef3d6d diff --git a/_source/plugins/maximize/plugin.js b/_source/plugins/maximize/plugin.js index 4c40544..a3a260a 100644 --- a/_source/plugins/maximize/plugin.js +++ b/_source/plugins/maximize/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -114,7 +114,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license editorFocus : false, exec : function() { - var container = editor.container.getChild( [ 0, 0 ] ); + var container = editor.container.getChild( 0 ); var contents = editor.getThemeSpace( 'contents' ); // Save current selection and scroll position in editing area. @@ -165,8 +165,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license } ); } - // Scroll to the top left. - mainWindow.$.scrollTo( 0, 0 ); + // Scroll to the top left (IE needs some time for it - #4923). + CKEDITOR.env.ie ? + setTimeout( function() { mainWindow.$.scrollTo( 0, 0 ); }, 0 ) : + mainWindow.$.scrollTo( 0, 0 ); // Resize and move to top left. var viewPaneSize = mainWindow.getViewPaneSize(); @@ -212,7 +214,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license } // Restore the window scroll position. - mainWindow.$.scrollTo( outerScroll.x, outerScroll.y ); + CKEDITOR.env.ie ? + setTimeout( function() { mainWindow.$.scrollTo( outerScroll.x, outerScroll.y ); }, 0 ) : + mainWindow.$.scrollTo( outerScroll.x, outerScroll.y ); // Remove cke_maximized class. container.removeClass( 'cke_maximized' );