sydcanem / bootstrap-contextmenu

Context menu plugin for Twitter's Bootstrap framework
http://sydcanem.com/bootstrap-contextmenu/
645 stars 193 forks source link

Fix calling onItem for all the instances of contextmenu that use the same dropdown. #27

Closed ninio closed 11 years ago

ninio commented 11 years ago

Added a _context_this_ref in the data of the shown context menu to call only the onItem callback function that is initialized for this istance of the contextmenu.

This was causing a problem if you initialize multiple times the Contextmenu and all of them use same dropdown element. In this case each onItem is called instead of only the one that was initialized for the specific element/selector.

sydcanem commented 11 years ago

I have'nt been able to use this for more than one contextmenu. Thanks for the patch.

ninio commented 11 years ago

No problem! This library is a really nice idea! :+1:

sydcanem commented 10 years ago

Hi, I made some major changes in the 2.0 branch. Hoping you could give it a try. Most of the change was on the closing of context menus. Clicking on an item on a context menu will now prevent other opened context menus from closing.

ninio commented 10 years ago

I'll test it and will let you know :)