X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fmaximize%2Fplugin.js;h=5b405d054d747fb08a741262eefbb4fb0a7ec437;hp=fa2f7913098070bf8bdf3e074b79b2a7d7c180fa;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hpb=9afde8772159bd3436f1f5b7862960307710ae5a diff --git a/_source/plugins/maximize/plugin.js b/_source/plugins/maximize/plugin.js index fa2f791..5b405d0 100644 --- a/_source/plugins/maximize/plugin.js +++ b/_source/plugins/maximize/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -194,10 +194,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license container.setCustomData( 'maximize_saved_styles', saveStyles( container, true ) ); // Hide scroll bars. - var viewPaneSize = mainWindow.getViewPaneSize(); var styles = { - overflow : 'hidden', + overflow : CKEDITOR.env.webkit ? '' : 'hidden', // #6896 width : 0, height : 0 }; @@ -268,6 +267,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Remove cke_maximized class. container.removeClass( 'cke_maximized' ); + // Webkit requires a re-layout on editor chrome. (#6695) + if ( CKEDITOR.env.webkit ) + { + container.setStyle( 'display', 'inline' ); + setTimeout( function(){ container.setStyle( 'display', 'block' ); }, 0 ); + } + if ( shim ) { shim.remove(); @@ -283,12 +289,16 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Toggle button label. var button = this.uiItems[ 0 ]; - var label = ( this.state == CKEDITOR.TRISTATE_OFF ) - ? lang.maximize : lang.minimize; - var buttonNode = editor.element.getDocument().getById( button._.id ); - buttonNode.getChild( 1 ).setHtml( label ); - buttonNode.setAttribute( 'title', label ); - buttonNode.setAttribute( 'href', 'javascript:void("' + label + '");' ); + // Only try to change the button if it exists (#6166) + if( button ) + { + var label = ( this.state == CKEDITOR.TRISTATE_OFF ) + ? lang.maximize : lang.minimize; + var buttonNode = editor.element.getDocument().getById( button._.id ); + buttonNode.getChild( 1 ).setHtml( label ); + buttonNode.setAttribute( 'title', label ); + buttonNode.setAttribute( 'href', 'javascript:void("' + label + '");' ); + } // Restore selection and scroll position in editing area. if ( editor.mode == 'wysiwyg' )