This demo shows how to use the closedby="any" attribute on a <dialog> element to enable "light-dismiss" (clicking outside) behavior.
closedby="any"
<dialog>
This modal dialog can be closed by clicking outside of its content (on the backdrop) or by pressing the Esc key.
Esc