Ticket #4343: 4343_2.patch
File 4343_2.patch, 1.9 KB (added by , 13 years ago) |
---|
-
_source/plugins/wysiwygarea/plugin.js
479 479 480 480 // Adds the document body as a context menu target. 481 481 if ( editor.contextMenu ) 482 editor.contextMenu.addTarget( domDocument );482 editor.contextMenu.addTarget( domDocument, editor.config.browserContextMenuOnCtrl ); 483 483 484 484 setTimeout( function() 485 485 { -
_source/plugins/contextmenu/plugin.js
126 126 127 127 proto : 128 128 { 129 addTarget : function( element )129 addTarget : function( element, nativeContextMenuOnCtrl ) 130 130 { 131 131 // Opera doesn't support 'contextmenu' event, we have duo approaches employed here: 132 132 // 1. Inherit the 'button override' hack we introduced in v2 (#4530), while this require the Opera browser … … 147 147 return; 148 148 } 149 149 150 if ( nativeContextMenuOnCtrl 151 && ( evt.$.ctrlKey || evt.$.metaKey ) ) 152 return; 153 150 154 var target = evt.getTarget(); 151 155 152 156 if( !contextMenuOverrideButton ) … … 179 183 { 180 184 var domEvent = event.data; 181 185 186 if ( nativeContextMenuOnCtrl 187 && ( domEvent.$.ctrlKey || domEvent.$.metaKey ) ) 188 return; 189 182 190 // Cancel the browser context menu. 183 191 domEvent.preventDefault(); 184 192 … … 208 216 } 209 217 }); 210 218 219 /** 220 * Whether preserve browser native context menu when 'Ctrl' or 'Meta' key 221 * is pressed while open context menu. 222 * @name CKEDITOR.config.browserContextMenuOnCtrl 223 * @type Boolean 224 * @default true 225 * @example 226 * config.browserContextMenuOnCtrl = false; 227 */