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 => {
              e.stopPropagation();
            })

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 https://github.com/vaadin/flow/issues/1363 solved my problem, thanks! :slight_smile: