JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.5.1
[ckeditor.git] / _source / plugins / floatpanel / plugin.js
index 8940192..ab8c19f 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 \r
@@ -60,6 +60,8 @@ CKEDITOR.plugins.add( 'floatpanel',
                                children : [],\r
                                dir : editor.lang.dir\r
                        };\r
+\r
+                       editor.on( 'mode', function(){ this.hide(); }, this );\r
                },\r
 \r
                proto :\r
@@ -123,10 +125,11 @@ CKEDITOR.plugins.add( 'floatpanel',
 \r
                                element.setStyles(\r
                                        {\r
-                                               top : 0,\r
+                                               top : top + 'px',\r
                                                left: 0,\r
                                                display : ''\r
                                        });\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
@@ -302,7 +305,7 @@ CKEDITOR.plugins.add( 'floatpanel',
                                                        // We need this get fired manually because of unfired focus() function.\r
                                                        this.allowBlur( true );\r
                                                }, 0, this);\r
-                                       }, 0, this);\r
+                                       },  CKEDITOR.env.air ? 200 : 0, this);\r
                                this.visible = 1;\r
 \r
                                if ( this.onShow )\r