IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
29 | 29 | body.on( command, onExec ); |
30 | 30 | |
31 | 31 | // IE6/7: document.execCommand has problem to paste into positioned element. |
32 | | ( CKEDITOR.env.version > 7 ? doc.$ : doc.$.selection.createRange() ) [ 'execCommand' ]( command ); |
| 32 | doc.$.selection.createRange()[ 'execCommand' ]( command ) |
33 | 33 | |
34 | 34 | body.removeListener( command, onExec ); |
35 | 35 | |
… |
… |
|
281 | 281 | } |
282 | 282 | |
283 | 283 | var depressBeforeEvent; |
| 284 | var depressPasteEvent; |
284 | 285 | function stateFromNamedCommand( command, editor ) |
285 | 286 | { |
286 | 287 | // IE Bug: queryCommandEnabled('paste') fires also 'beforepaste(copy/cut)', |
… |
… |
|
382 | 383 | var body = editor.document.getBody(); |
383 | 384 | body.on( CKEDITOR.env.webkit ? 'paste' : 'beforepaste', function( evt ) |
384 | 385 | { |
385 | | if ( depressBeforeEvent ) |
| 386 | // To dismiss some wrong ones in IE, e.g. when menu is opened. |
| 387 | if ( depressBeforeEvent || |
| 388 | evt.data && evt.data.$ && ( evt.data.$.offsetY < 0 || evt.data.$.offsetX < 0 ) ) |
| 389 | { |
386 | 390 | return; |
| 391 | } |
387 | 392 | |
388 | 393 | // Fire 'beforePaste' event so clipboard flavor get customized |
389 | 394 | // by other plugins. |
… |
… |
|
403 | 408 | } ); |
404 | 409 | }); |
405 | 410 | |
406 | | // Dismiss the (wrong) 'beforepaste' event fired on context menu open. (#7953) |
| 411 | // Handle paste from browser toolbar menu which misses the "beforepaste" event. |
| 412 | CKEDITOR.env.ie && body.on( 'paste', function( evt ) |
| 413 | { |
| 414 | if ( ! ( depressPasteEvent || editor.document.getById( 'cke_pastebin' ) ) ) |
| 415 | { |
| 416 | // Prevent native paste. |
| 417 | evt.data.preventDefault(); |
| 418 | |
| 419 | depressPasteEvent = 1; |
| 420 | window.setTimeout( function() { depressPasteEvent = 0; } ); |
| 421 | |
| 422 | // Resort to the paste command. |
| 423 | pasteCmd.exec( editor ); |
| 424 | } |
| 425 | }); |
| 426 | |
| 427 | // Dismiss the (wrong) 'beforepaste' event fired on context menu open. |
407 | 428 | body.on( 'contextmenu', function() |
408 | 429 | { |
409 | 430 | depressBeforeEvent = 1; |