Ticket #4874: 4874.patch
File 4874.patch, 1.4 KB (added by , 14 years ago) |
---|
-
_source/plugins/clipboard/plugin.js
303 303 body.on( ( mode == 'text' && CKEDITOR.env.ie ) ? 'paste' : 'beforepaste', 304 304 function( evt ) 305 305 { 306 if( depressBeforePasteEvent ) 307 return; 308 306 309 getClipboardData.call( editor, evt, mode, function ( data ) 307 310 { 308 311 // The very last guard to make sure the … … 321 324 // If the "contextmenu" plugin is loaded, register the listeners. 322 325 if ( editor.contextMenu ) 323 326 { 327 var depressBeforePasteEvent; 324 328 function stateFromNamedCommand( command ) 325 329 { 326 return editor.document.$.queryCommandEnabled( command ) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED; 330 // IE Bug: queryCommandEnabled('paste') fires also 'beforepaste', 331 // guard to distinguish from the ordinary sources( either 332 // keyboard paste or execCommand ) (#4874). 333 CKEDITOR.env.ie && command == 'Paste'&& ( depressBeforePasteEvent = 1 ); 334 335 var retval = editor.document.$.queryCommandEnabled( command ) ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED; 336 depressBeforePasteEvent = 0; 337 return retval; 327 338 } 328 339 329 340 editor.contextMenu.addListener( function()