File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ jQuery.fn.contextPopup = function(menuData) {
3737 $ . extend ( settings , menuData ) ;
3838
3939 // Build popup menu HTML
40- function createMenu ( ) {
40+ function createMenu ( e ) {
4141 var menu = $ ( '<ul class="' + settings . contextMenuClass + '"><div class="' + settings . gutterLineClass + '"></div></ul>' )
4242 . appendTo ( document . body ) ;
4343 if ( settings . title ) {
@@ -57,7 +57,7 @@ jQuery.fn.contextPopup = function(menuData) {
5757 }
5858 row . find ( 'span' ) . text ( item . label ) ;
5959 if ( item . action ) {
60- row . find ( 'a' ) . click ( item . action ) ;
60+ row . find ( 'a' ) . click ( function ( ) { item . action ( e ) ; } ) ;
6161 }
6262 } else {
6363 $ ( '<li class="' + settings . seperatorClass + '"></li>' ) . appendTo ( menu ) ;
@@ -71,7 +71,7 @@ jQuery.fn.contextPopup = function(menuData) {
7171 this . bind ( 'contextmenu' , function ( e ) {
7272
7373 // Create and show menu
74- var menu = createMenu ( )
74+ var menu = createMenu ( e )
7575 . show ( )
7676 . css ( { zIndex :1000001 , left :e . pageX + 5 /* nudge to the right, so the pointer is covering the title */ , top :e . pageY } )
7777 . bind ( 'contextmenu' , function ( ) { return false ; } ) ;
You can’t perform that action at this time.
0 commit comments