We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 16e4b14 + 331c527 commit 2d24382Copy full SHA for 2d24382
src/jquery.contextMenu.js
@@ -239,6 +239,7 @@
239
},
240
// events
241
events: {
242
+ preShow: $.noop,
243
show: $.noop,
244
hide: $.noop,
245
activated: $.noop
@@ -278,6 +279,11 @@
278
279
// contextmenu show dispatcher
280
contextmenu: function (e) {
281
var $this = $(this);
282
+
283
+ //Show browser context-menu when preShow returns false
284
+ if (e.data.events.preShow($this,e) === false) {
285
+ return;
286
+ }
287
288
// disable actual context-menu if we are using the right mouse button as the trigger
289
if (e.data.trigger === 'right') {
0 commit comments