Closed
Description
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).