X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Ffloatpanel%2Fplugin.js;h=05772223c46c5a835ca21db4992d0dd25d787cd9;hb=055b6b0792ce7dc53d47af606b367c04b927c2ab;hp=6d5744203f47f8fada259f8f43c9057fcbab3c5e;hpb=059b4c2fef02528bf1af189f7996e80652faddfb;p=ckeditor.git diff --git a/_source/plugins/floatpanel/plugin.js b/_source/plugins/floatpanel/plugin.js index 6d57442..0577222 100644 --- a/_source/plugins/floatpanel/plugin.js +++ b/_source/plugins/floatpanel/plugin.js @@ -129,14 +129,15 @@ CKEDITOR.plugins.add( 'floatpanel', element.setStyles( { - top : top + 'px', - left : '-3000px', - opacity : '0', // FF3 is ignoring "visibility" + top : '-30000px', display : '' }); + // Don't use display or visibility style because we need to + // calculate the rendering layout later and focus the element. + element.setOpacity( 0 ); // To allow the context menu to decrease back their width - element.getFirst().removeStyle('width'); + element.getFirst().removeStyle( 'width' ); // Configure the IFrame blur event. Do that only once. if ( !this._.blurSet ) @@ -203,10 +204,10 @@ CKEDITOR.plugins.add( 'floatpanel', // We must adjust first the width or IE6 could include extra lines in the height computation var widthNode = block.element.$; - if ( CKEDITOR.env.gecko || CKEDITOR.env.opera) + if ( CKEDITOR.env.gecko || CKEDITOR.env.opera ) widthNode = widthNode.parentNode; - if ( CKEDITOR.env.ie) + if ( CKEDITOR.env.ie ) widthNode = widthNode.document.body; var width = widthNode.scrollWidth; @@ -262,10 +263,9 @@ CKEDITOR.plugins.add( 'floatpanel', element.setStyles( { top : top + 'px', - left : left + 'px', - opacity : '1' + left : left + 'px' } ); - + element.setOpacity( 1 ); } , this ); panel.isLoaded ? panelLoad() : panel.onLoad = panelLoad;