File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 19
19
options : {
20
20
delegate : "[data-menu]" , // selector
21
21
menu : null , // selector or jQuery or a function returning such
22
+ preventBuiltinMenu : true ,
22
23
// Events:
23
24
beforeopen : $ . noop , // menu about to open; return `false` to prevent opening
24
25
blur : $ . noop , // menu option lost focus
30
31
select : $ . noop // menu option was selected; return `false` to prevent closing
31
32
} ,
32
33
_create : function ( ) {
33
- var self = this ;
34
34
this . element . delegate ( this . options . delegate , "click" , $ . proxy ( this . _openMenu , this ) ) ;
35
+ if ( this . options . preventBuiltinMenu ) {
36
+ this . element . delegate ( this . options . delegate , "contextmenu.contextmenu" , function ( event ) {
37
+ return false ;
38
+ } ) ;
39
+ }
35
40
this . _trigger ( "init" ) ;
36
41
} ,
37
42
/** Return menu jQuery object. */
You can’t perform that action at this time.
0 commit comments