Skip to content

Commit cfd12ad

Browse files
committed
Fixed mar10#3
1 parent c7c1689 commit cfd12ad

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

jquery.contextmenu.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
menu: null, // selector or jQuery or a function returning such
2222
taphold: 2000, // open menu after 2000 ms long touch
2323
// Events:
24-
beforeopen: $.noop, // menu about to open; return `false` to prevent opening
24+
beforeOpen: $.noop, // menu about to open; return `false` to prevent opening
2525
blur: $.noop, // menu option lost focus
2626
close: $.noop, // menu was closed
2727
create: $.noop, // menu was initialized
@@ -85,7 +85,7 @@
8585
// that refer to the contextmenu's context (which is the target *container*)
8686
event.relatedTarget = openEvent.target;
8787

88-
if( this._trigger("beforeopen", event) === false ){
88+
if( this._trigger("beforeOpen", event) === false ){
8989
return false;
9090
}
9191
// Create - but hide - context-menu
@@ -117,6 +117,7 @@
117117
}
118118
});
119119
$menu
120+
.show() // required to fix positioning error (issue #)
120121
.css({
121122
position: "absolute",
122123
left: 0,
@@ -126,7 +127,8 @@
126127
at: "left bottom",
127128
of: event,
128129
collision: "fit"
129-
}).slideDown("fast", function(){
130+
}).hide()
131+
.slideDown("fast", function(){
130132
self._trigger.call(self, "open", event);
131133
});
132134
},

0 commit comments

Comments
 (0)