JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.6.1
[ckeditor.git] / _source / plugins / button / plugin.js
index 80c48c1..7655229 100644 (file)
@@ -89,7 +89,11 @@ CKEDITOR.ui.button.prototype =
                        },\r
                        execute : function()\r
                        {\r
-                               this.button.click( editor );\r
+                               // IE 6 needs some time before execution (#7922)\r
+                               if ( CKEDITOR.env.ie && CKEDITOR.env.version < 7 )\r
+                                       CKEDITOR.tools.setTimeout( function(){ this.button.click( editor ); }, 0, this );\r
+                               else\r
+                                       this.button.click( editor );\r
                        }\r
                };\r
 \r
@@ -206,8 +210,9 @@ CKEDITOR.ui.button.prototype =
 \r
                output.push(\r
                                        ' onkeydown="return CKEDITOR.tools.callFunction(', keydownFn, ', event);"' +\r
-                                       ' onfocus="return CKEDITOR.tools.callFunction(', focusFn,', event);"' +\r
-                               ' onclick="CKEDITOR.tools.callFunction(', clickFn, ', this); return false;">' +\r
+                                       ' onfocus="return CKEDITOR.tools.callFunction(', focusFn,', event);" ' +\r
+                                       ( CKEDITOR.env.ie ? 'onclick="return false;" onmouseup' : 'onclick' ) +         // #188\r
+                                               '="CKEDITOR.tools.callFunction(', clickFn, ', this); return false;">' +\r
                                        '<span class="cke_icon"' );\r
 \r
                if ( this.icon )\r