vaadin details: prevent opening it

I have a details component with a button inside the summary.
on clicking that button in the summary, a dialog should open, BUT the details component should not change its opened state.
how to consume that button-click-event or prevent changing opened state?

Calling stopPropagation in the button click event worked for me.

button.addEventListener('click', e => {

yeah, i could do that on the html/js side, but I want to set that behavior on the java side?

is that possible?

buttonContainer.element.addEventListener(“click”) {}.addEventData(“event.stopPropagation()”)

mentioned in solved my problem, thanks! :slight_smile: