SwiftMango
SwiftMango

Reputation: 15284

GWT: How can I only trigger the button click event when the button is in a panel?

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

Answers (1)

StriplingWarrior
StriplingWarrior

Reputation: 156459

Just call event.stopPropagation() in your click handler. See the answer here for an example.

Upvotes: 1

Related Questions