JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.3.2
[ckeditor.git] / _source / plugins / floatpanel / plugin.js
index 6d57442..0577222 100644 (file)
@@ -129,14 +129,15 @@ CKEDITOR.plugins.add( 'floatpanel',
 \r
                                element.setStyles(\r
                                        {\r
-                                               top : top + 'px',\r
-                                               left : '-3000px',\r
-                                               opacity : '0',  // FF3 is ignoring "visibility"\r
+                                               top : '-30000px',\r
                                                display : ''\r
                                        });\r
+                               // Don't use display or visibility style because we need to\r
+                               // calculate the rendering layout later and focus the element.\r
+                               element.setOpacity( 0 );\r
 \r
                                // To allow the context menu to decrease back their width\r
-                               element.getFirst().removeStyle('width');\r
+                               element.getFirst().removeStyle( 'width' );\r
 \r
                                // Configure the IFrame blur event. Do that only once.\r
                                if ( !this._.blurSet )\r
@@ -203,10 +204,10 @@ CKEDITOR.plugins.add( 'floatpanel',
                                                                // We must adjust first the width or IE6 could include extra lines in the height computation\r
                                                                var widthNode = block.element.$;\r
 \r
-                                                               if ( CKEDITOR.env.gecko || CKEDITOR.env.opera)\r
+                                                               if ( CKEDITOR.env.gecko || CKEDITOR.env.opera )\r
                                                                        widthNode = widthNode.parentNode;\r
 \r
-                                                               if ( CKEDITOR.env.ie)\r
+                                                               if ( CKEDITOR.env.ie )\r
                                                                        widthNode = widthNode.document.body;\r
 \r
                                                                var width = widthNode.scrollWidth;\r
@@ -262,10 +263,9 @@ CKEDITOR.plugins.add( 'floatpanel',
                                                        element.setStyles(\r
                                                                {\r
                                                                        top : top + 'px',\r
-                                                                       left : left + 'px',\r
-                                                                       opacity : '1'\r
+                                                                       left : left + 'px'\r
                                                                } );\r
-\r
+                                                       element.setOpacity( 1 );\r
                                                } , this );\r
 \r
                                                panel.isLoaded ? panelLoad() : panel.onLoad = panelLoad;\r