JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.2
[ckeditor.git] / _source / plugins / clipboard / plugin.js
index 9dc230e..7a1c971 100644 (file)
@@ -16,10 +16,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                var doc = editor.document,\r
                        body = doc.getBody();\r
 \r
-               var     enabled = false;\r
+               var enabled = 0;\r
                var onExec = function()\r
                {\r
-                       enabled = true;\r
+                       enabled = 1;\r
                };\r
 \r
                // The following seems to be the only reliable way to detect that\r
@@ -163,16 +163,16 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
        {\r
                var doc = this.document;\r
 \r
-               // Avoid recursions on 'paste' event for IE.\r
-               if ( CKEDITOR.env.ie && doc.getById( 'cke_pastebin' ) )\r
+               // Avoid recursions on 'paste' event or consequent paste too fast. (#5730)\r
+               if ( doc.getById( 'cke_pastebin' ) )\r
                        return;\r
 \r
                // If the browser supports it, get the data directly\r
-               if (mode == 'text' && evt.data && evt.data.$.clipboardData)\r
+               if ( mode == 'text' && evt.data && evt.data.$.clipboardData )\r
                {\r
                        // evt.data.$.clipboardData.types contains all the flavours in Mac's Safari, but not on windows.\r
                        var plain = evt.data.$.clipboardData.getData( 'text/plain' );\r
-                       if (plain)\r
+                       if ( plain )\r
                        {\r
                                evt.data.preventDefault();\r
                                callback( plain );\r
@@ -254,7 +254,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
        // Cutting off control type element in IE standards breaks the selection entirely. (#4881)\r
        function fixCut( editor )\r
        {\r
-               if ( !CKEDITOR.env.ie || editor.document.$.compatMode == 'BackCompat' )\r
+               if ( !CKEDITOR.env.ie || CKEDITOR.env.quirks )\r
                        return;\r
 \r
                var sel = editor.getSelection();\r
@@ -348,7 +348,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                editor.on( 'contentDom', function()\r
                                {\r
                                        var body = editor.document.getBody();\r
-                                       body.on( ( (mode == 'text' && CKEDITOR.env.ie) || CKEDITOR.env.webkit ) ? 'paste' : 'beforepaste',\r
+                                       body.on( ( (mode == 'text' && CKEDITOR.env.ie ) || CKEDITOR.env.webkit ) ? 'paste' : 'beforepaste',\r
                                                function( evt )\r
                                                {\r
                                                        if ( depressBeforeEvent )\r