Context.js icon indicating copy to clipboard operation
Context.js copied to clipboard

removing destroyed context menu's from the DOM

Open rovolution opened this issue 10 years ago • 2 comments

hey jakiestfu,

Thanks for this awesome plugin btw! Hands down the best bootstrap context menu plugin I've worked with.

This pull request is to fix an issue I had with it in one of the applications I am working on.

In my use case, I have a graph consisting of nodes and edges, where each node has its own context menu. A user is constantly loading different graphs, which requires the frequent removal/addition of nodes.

I noticed that whenever I destroyed a context menu on a node, it was not actually removing it from the DOM. Consequently my DOM would become populated with these 'ghost' context menus. This fix removes the context menu from the DOM when the destroy call is made.

Let me know what you think and if I should change anything.

Thanks!

rovolution avatar Sep 27 '13 19:09 rovolution

hey @jakiestfu, did you ever get a chance to check this out?

Thanks!

rovolution avatar Oct 19 '13 04:10 rovolution

+1 on this pull request.

Misiu avatar Jul 25 '14 08:07 Misiu