diff --git a/docs.html b/docs.html index 63f2f0d0..a5ce603c 100755 --- a/docs.html +++ b/docs.html @@ -252,6 +252,8 @@

options.items

Events to register on <input> elements

Only used with types "text", "textarea", "radio", "checkbox" and "select".

Example: { command1: {name: "Foobar", type: "text", events: {keyup: function(e){alert(e.keyCode);}} }}

+

The contents of the options object are passed to jQuery event.data.

+

Example: { command1: {name: "Foobar", type: "text", events: {keyup: function(e){alert(e.data.$trigger.attr("id"));}} }}

(string) value
diff --git a/src/jquery.contextMenu.js b/src/jquery.contextMenu.js index e6744f90..ea5bccff 100755 --- a/src/jquery.contextMenu.js +++ b/src/jquery.contextMenu.js @@ -1051,7 +1051,7 @@ var // currently active contextMenu trigger .on('blur', handle.blurInput); if (item.events) { - $input.on(item.events); + $input.on(item.events, opt); } }