vakata / jstree

jquery tree plugin
http://jstree.com
MIT License
5.15k stars 1.38k forks source link

How to prevent the right-click menu event from bubbling #2438

Closed andrew2558 closed 4 years ago

andrew2558 commented 4 years ago

How to prevent the right-click menu event from bubbling, because I added other events to the menu parent element

vakata commented 4 years ago

Use the built in event methods - stopPropagation(), etc - you get the original event in all handlers. Or alternatively you can check the event origin in your outside handlers and act accordingly.