A solution for the shadcn-on-Base-UI pair Dialog + Combobox, where the combobox
is open inside a modal. Expected behavior: the first click on the overlay closes only
the combobox, the second one closes the dialog.
Verified on @base-ui/react@1.8.0 (Astro 7 + React 19, but nothing framework-specific).