Custom context menu 'Normal Action' bubbling/event issues

Custom context menu 'Normal Action' bubbling/event issues

I am integrating a custom (left click) context menu into my system. I know, i know, bad UI, etc. but it does make sense in the system.

Regardless, I've tried a few different jQuery context menus, they work well, but I can't figure out how to make the click of a context menu item cause the original action of the object the menu is working for to function.


All the menus I've tested use e.preventDefault() or return false;. Which makes sense, but I thought it would work if I had a normalAction variable set that is default to false, causing the context menu to appear, but when the 'Normal Action' menu item in my context menu is clicked, it sets normalAction to true and therefore triggers the normal click action of the object again. (because there is no return false; etc)

In theory I thought this would work, and it does, if you click the item again after clicking 'Normal Action' in the context menu. Any tips from users that have good knowledge of bubbling/events?

Thanks heaps