X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fcontextmenu%2Fplugin.js;h=1c83546cad690c43846d4033f0910274325c08eb;hp=3f25a9461cb4bc2f143d1c0e7c9c96ad1bb732af;hb=c6e377a02b54abc07129d72b632763c727476a15;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6 diff --git a/_source/plugins/contextmenu/plugin.js b/_source/plugins/contextmenu/plugin.js index 3f25a94..1c83546 100644 --- a/_source/plugins/contextmenu/plugin.js +++ b/_source/plugins/contextmenu/plugin.js @@ -54,26 +54,18 @@ CKEDITOR.plugins.contextMenu = CKEDITOR.tools.createClass( menu = this._.menu = new CKEDITOR.menu( editor ); menu.onClick = CKEDITOR.tools.bind( function( item ) { - var noUnlock = true; menu.hide(); - if ( CKEDITOR.env.ie ) - menu.onEscape(); - if ( item.onClick ) item.onClick(); else if ( item.command ) editor.execCommand( item.command ); - noUnlock = false; }, this ); menu.onEscape = function() { editor.focus(); - - if ( CKEDITOR.env.ie ) - editor.getSelection().unlock( true ); }; } @@ -138,7 +130,7 @@ CKEDITOR.plugins.contextMenu = CKEDITOR.tools.createClass( element.on( 'mousedown', function( evt ) { evt = evt.data; - if( evt.$.button != 2 ) + if ( evt.$.button != 2 ) { if ( evt.getKeystroke() == CKEDITOR.CTRL + 1 ) element.fire( 'contextmenu', evt ); @@ -151,7 +143,7 @@ CKEDITOR.plugins.contextMenu = CKEDITOR.tools.createClass( var target = evt.getTarget(); - if( !contextMenuOverrideButton ) + if ( !contextMenuOverrideButton ) { var ownerDoc = target.getDocument(); contextMenuOverrideButton = ownerDoc.createElement( 'input' ) ; @@ -210,7 +202,7 @@ CKEDITOR.plugins.contextMenu = CKEDITOR.tools.createClass( }, this ); - if( CKEDITOR.env.webkit ) + if ( CKEDITOR.env.webkit ) { var holdCtrlKey, onKeyDown = function( event )