Open knoobie opened 1 month ago
This is kind of by design as the "modeless" overlay doesn't use global outside click /
We did have to add some workarounds for it especially custom outside click listener for vaadin-context-menu
.
If this is not a bug.. it probably has to be documented on the flow side on either modal or closeOnOutsideClick - I was kinda suprised by this :) We use setModal(false) often because of the "problems" with server-side modality; which renders the closeOnOutsideClick flag "useless".
Note, you can have modal dialog and disable the server side modality using API in UI class.
Something is wrong if people start using non-modal dialogs to work around server-side modality. Maybe there should be a more obvious API on the component level to disable it.
Right now disabling it is not straightforward:
For comparison, this works:
add(dialog);
dialog.open();
ui.setChildComponentModal(dialog, false);
And these don't:
dialog.open();
ui.setChildComponentModal(dialog, false);
add(dialog);
ui.setChildComponentModal(dialog, false);
dialog.open();
Description
Using modeless (setModal(false) does not honor
closeOnOutsideClick
and stays open.Expected outcome
Dialog closes when clicking outside.
Minimal reproducible example
Environment
Vaadin version(s): 24.4.10
Browsers
All