X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fmaximize%2Fplugin.js;h=abefd1d31c5bcd4aac8c305e5dd37c40b22c0953;hb=4e90e78dc97789709ee7404359a5517540c27553;hp=fa2f7913098070bf8bdf3e074b79b2a7d7c180fa;hpb=614511639979907ceb0da3614122a4d8eb963ad4;p=ckeditor.git diff --git a/_source/plugins/maximize/plugin.js b/_source/plugins/maximize/plugin.js index fa2f791..abefd1d 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,17 +194,16 @@ 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 }; mainDocument.getDocumentElement().setStyles( styles ); !CKEDITOR.env.gecko && mainDocument.getDocumentElement().setStyle( 'position', 'fixed' ); - mainDocument.getBody().setStyles( styles ); + !( CKEDITOR.env.gecko && CKEDITOR.env.quirks ) && mainDocument.getBody().setStyles( styles ); // Scroll to the top left (IE needs some time for it - #4923). CKEDITOR.env.ie ? @@ -212,7 +211,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license mainWindow.$.scrollTo( 0, 0 ); // Resize and move to top left. - container.setStyle( 'position', 'absolute' ); + // Special treatment for FF Quirks (#7284) + container.setStyle( 'position', CKEDITOR.env.gecko && CKEDITOR.env.quirks ? 'fixed' : 'absolute' ); container.$.offsetLeft; // SAFARI BUG: See #2066. container.setStyles( { @@ -268,6 +268,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 +290,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' )