Open abdullahtellioglu opened 2 months ago
Would stopImmediatePropagation()
work for you as a workaround?
It works, thanks
It's a bit unclear what value the proposed check would provide for Flow users, since they are generally expected to control whether the dialog should close from the server-side. If so, I'm concerned that the only purpose of this check would be to accommodate a specific Copilot scenario.
I'm now thinking that using stopImmediatePropagation()
in the capture phase might actually be an appropriate solution here, as it ensures that no vaadin-overlay-outside-click
listeners are be executed at all. This approach would also work for grid-pro which exits edit mode on vaadin-overlay-outside-click
and does not check for preventDefault()
:
Description
I added
vaadin-overlay-outside-click
event listener to prevent the dialog from being closed in Copilot. However, event.preventDefault() does not work because it is not checked inhttps://github.com/vaadin/flow-components/assets/100126447/3a04fbf2-2c1c-4269-944d-aa9fab7ce75b
Expected outcome
Event should not be sent to the server if it is defaultPrevented. Adding
e.defaultPrevented
condition to listener would solve the issueMinimal reproducible example
// view
//in client
Steps to reproduce
Environment
Vaadin version(s): 24.4.0.alpha23 OS:
Browsers
Issue is not browser related