Reputation: 15284
I have a button in a horizontal panel. Both the button and panel have click handler.
When I click the button, I only want the button click handler to work but not the panel one, but it triggers both.
How can I avoid triggering the panel click handler?
Upvotes: 0
Views: 237
Reputation: 156459
Just call event.stopPropagation()
in your click handler. See the answer here for an example.
Upvotes: 1