Nested onClick events - how to preventDefault?

I have an item that I click, and when I click it, I do something. But I also have an item inside of this parent element, that also has its own actions when I click it.

But because there must be some kind of event listener on the parent, it triggers this item when I click the child element. Is there any way to go around this? Thanks!

I’ve tried to use event.preventDefault but nothing seems to work. Thanks!

I think it should be event.domEvent.preventDefault, you was probably on the right path :slight_smile:

2 Likes

Oo I gotta get familiar with WeWeb’s expected syntax. Thanks!

Add the html attribute as in the image in the child element.

2 Likes

Awesome, thanks!