-
Notifications
You must be signed in to change notification settings - Fork 219
Description
When playing with popover recently, I ran into a scenario which I think will be relatively common: folks wanting dialog-like behavior (i.e. inerting content on the rest of the page when the dialog is open), with the developer ergonomics that popover and popovertoggle provide.
In this example, I wouldn't want the rest of the page to be interactive while one of the popovers is open (you can see that I can still hover and click on buttons behind the popover ::backdrop. Not ideal.
In this case, the popovers should probably be dialogs, but making them <dialog>, plus invoking them with .showModal() is the only way to get this behavior. Is there a way to get declarative popover-like developer ergonomics with dialog element semantics and behavior?
Some initial thoughts on solutions:
- A new value for the popover attribute to clarify behavior such as
popover=modaldialog - A seperate declarative trigger for dialog, such as
dialogtarget=foo dialogtargetaction=modal(@mfreed7's suggestion)
