Hacker News new | ask | show | jobs
by H1Supreme 771 days ago
> Popovers created using the Popover API are always non-modal. If you want to create a modal popover, a <dialog> element is the right way to go.

Why? This is a legitimate use case for a popover. Especially if you're blurring the background while it's open. Why even offer that feature if a user's click can potentially trigger an action on some blurred out button.

*edit:

Apparently, you can combine the two:

> You can turn a <dialog> element into a popover (<dialog popover> is perfectly valid) if you want to combine popover control with dialog semantics.

Wouldn't <popover modal=true> make more sense here? They're clearly acknowledging a use case.

1 comments

Probably, among other things, because <dialog> existed much earlier.