Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"TypeError: root is not a function" when click on item named "watch" #93

Closed
hw-dwalter opened this issue Nov 30, 2012 · 3 comments
Closed
Labels

Comments

@hw-dwalter
Copy link

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
Copy link
Contributor

woha, that's… interesting. I'll look into it. Fiddle

@rodneyrehm
Copy link
Contributor

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
Copy link
Author

Thank you! That was really quick!

rodneyrehm added a commit that referenced this issue Dec 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants