Skip to content

Error on try to recreate menu after destroy #397

Closed
@punk2x

Description

@punk2x

When try to recreate menu on same selector, after destroy, causes the following error:

Uncaught TypeError: Cannot read property 'disabled' of undefined

your code:

disabled = ($.isFunction(item.disabled) && item.disabled.call($trigger, key, root)) || item.disabled === true,

On case 'destroy': ... if (o.context !== context) Is always false, and don't destroy anything. Removing this validation, all works.

My "destroy" code:
$(".my-context").contextMenu("destroy");

Tested on google chrome (50.0).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions