"TypeError: root is not a function" when click on item named "watch"
hw-dwalter opened this issue · 3 comments
hw-dwalter commented
My firefox (17.0) raises an error wehn i click on the item named "watch". The following code demonstrates this behaviour:
$.contextMenu({
selector: '.context-menu-one',
callback: function(key, options) {
var m = "clicked: " + key;
window.console && console.log(m) || alert(m);
},
items: {
"watch": {name: "Edit", icon: "edit"}
}
});
rodneyrehm commented
woha, that's… interesting. I'll look into it. Fiddle
rodneyrehm commented
I've fixed this locally. There won't be a new version released until christmas, I think.
In the mean time you can patch this yourself, replace Line 743 with the following:
if ($.isFunction(root.callbacks[key]) && Object.prototype.hasOwnProperty.call(root.callbacks, key)) {
hw-dwalter commented
Thank you! That was really quick!