Ticket #4825: 4825_2.patch

File 4825_2.patch, 947 bytes (added by Minh Nguyen, 14 years ago)

Block context menu when action on menu

  • _source/plugins/menu/plugin.js

     
    133133                                        item.order = this.items.length;
    134134
    135135                                this.items.push( item );
     136                               
    136137                        },
    137138
    138139                        removeAll : function()
     
    217218                                                },
    218219                                                this);
    219220                                }
    220 
     221                               
     222                                // Prevent contextmenu when clicking right mouse button twice #4825.
     223                                panel.element.on( 'contextmenu', function( event )
     224                                {
     225                                        event.data.preventDefault( );
     226                                } );
     227                                       
    221228                                // Put the items in the right order.
    222229                                sortItems( items );
    223230
     
    243250
    244251                                // Inject the HTML inside the panel.
    245252                                element.setHtml( output.join( '' ) );
    246 
    247253                                // Show the panel.
    248254                                if ( this.parent )
    249255                                        this.parent._.panel.showAsChild( panel, this.id, offsetParent, corner, offsetX, offsetY );
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy