X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Ffloatpanel%2Fplugin.js;h=4a24dfa4d31a5781af7cb6a8ed9646cc4b18885f;hp=7e9af39d01731ec4ad51cb4fc9ab38b67f01e033;hb=a272c66d841421f8bf933c16535bdcde1c4649fc;hpb=fb481ba0a7d298e3e7b9034fcb9f2afdc6e8e796 diff --git a/_source/plugins/floatpanel/plugin.js b/_source/plugins/floatpanel/plugin.js index 7e9af39..4a24dfa 100644 --- a/_source/plugins/floatpanel/plugin.js +++ b/_source/plugins/floatpanel/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -207,16 +207,9 @@ CKEDITOR.plugins.add( 'floatpanel', if ( block.autoSize ) { - // We must adjust first the width or IE6 could include extra lines in the height computation - var widthNode = block.element.$; + var panelDoc = block.element.getDocument(); + var width = ( CKEDITOR.env.webkit? block.element : panelDoc.getBody() )[ '$' ].scrollWidth; - if ( CKEDITOR.env.gecko || CKEDITOR.env.opera ) - widthNode = widthNode.parentNode; - - if ( CKEDITOR.env.ie ) - widthNode = widthNode.document.body; - - var width = widthNode.scrollWidth; // Account for extra height needed due to IE quirks box model bug: // http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug // (#3426)