Ticket #4369: 4369.patch
File 4369.patch, 1.9 KB (added by , 14 years ago) |
---|
-
_source/plugins/contextmenu/plugin.js
35 35 editor.execCommand( commandName ); 36 36 }, 37 37 this); 38 39 // Disable context menu for top and bottom editor's UI parts.40 var self = this;41 editor.on( 'themeLoaded', function()42 {43 self.addDisabledTarget( this.container );44 } );45 38 }, 46 39 47 40 _ : … … 154 147 this ); 155 148 }, 156 149 157 addDisabledTarget : function( element )158 {159 element.on( 'contextmenu', function( event )160 {161 // Cancel the browser context menu.162 if ( !event.data.getTarget().hasClass( 'cke_enable_context_menu' ) )163 event.data.preventDefault();164 } );165 },166 167 150 addListener : function( listenerFn ) 168 151 { 169 152 this._.listeners.push( listenerFn ); -
_source/themes/default/theme.js
86 86 */ 87 87 editor.container = container; 88 88 89 // Disable browser context menu for editor's chrome. 90 container.disableContextMenu(); 91 89 92 editor.fireOnce( 'themeLoaded' ); 90 93 editor.fireOnce( 'uiReady' ); 91 94 }, -
_source/core/dom/element.js
1380 1380 getChildCount : function() 1381 1381 { 1382 1382 return this.$.childNodes.length; 1383 } 1383 }, 1384 1385 disableContextMenu : function() 1386 { 1387 this.on( 'contextmenu', function( event ) 1388 { 1389 // Cancel the browser context menu. 1390 if ( !event.data.getTarget().hasClass( 'cke_enable_context_menu' ) ) 1391 event.data.preventDefault(); 1392 } ); 1393 } 1384 1394 });