Ticket #3633: 3633.patch

File 3633.patch, 2.1 KB (added by Tobiasz Cudnik, 15 years ago)
  • _source/plugins/panel/plugin.js

     
    253253                this.keys = {};
    254254
    255255                this._.focusIndex = -1;
     256
     257                // Disable context menu for panels.
     258                if ( CKEDITOR.plugins.contextMenu )
     259                        CKEDITOR.plugins.contextMenu.prototype.addDisabledTarget( this.element );
    256260        },
    257261
    258262        _ : {},
  • _source/plugins/contextmenu/plugin.js

     
    3535                                editor.execCommand( commandName );
    3636                        },
    3737                        this);
     38
     39                        // Disable context menu for top and bottom editor's UI parts.
     40                        var disable = this.addDisabledTarget;
     41                        editor.on( 'themeLoaded', function()
     42                                {
     43                                        // Top.
     44                                        disable( this.container.getChild( [ 0, 0, 0, 0, 0 ] ) );
     45                                        // Bottom.
     46                                        disable( this.container.getChild( [ 0, 0, 0, 0, 2 ] ) );
     47                                } );
    3848        },
    3949
    4050        _ :
     
    147157                                this );
    148158                },
    149159
     160                addDisabledTarget : function( element )
     161                {
     162                        element.on( 'contextmenu', function( event )
     163                                {
     164                                        // Cancel the browser context menu.
     165                                        event.data.preventDefault();
     166                                } );
     167                },
     168
    150169                addListener : function( listenerFn )
    151170                {
    152171                        this._.listeners.push( listenerFn );
  • CHANGES.html

     
    4848                <li><a href="http://dev.fckeditor.net/ticket/3528">#3528</a> : Fixed Context Menu issue when triggered using Shift+F10.</li>
    4949                <li><a href="http://dev.fckeditor.net/ticket/4028">#4028</a> : Maximize control's tool tip was wrong once it is maximized.</li>
    5050                <li><a href="http://dev.fckeditor.net/ticket/4237">#4237</a> : ToolBar is chopped off in Safari browser 3.x.</li>
     51                <li><a href="http://dev.fckeditor.net/ticket/3633">#3633</a> : Default context menu isn't disabled in toolbar, status bar, panels...</li>
    5152        </ul>
    5253        <h3>
    5354                CKEditor 3.0</h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy