diff --git a/.changeset/crisp-plums-roll.md b/.changeset/crisp-plums-roll.md new file mode 100644 index 0000000..535f005 --- /dev/null +++ b/.changeset/crisp-plums-roll.md @@ -0,0 +1,5 @@ +--- +"virtual-frame": patch +--- + +Support native dialog/popover elements diff --git a/examples/shared/dialog.html b/examples/shared/dialog.html new file mode 100644 index 0000000..5041139 --- /dev/null +++ b/examples/shared/dialog.html @@ -0,0 +1,381 @@ + + + + + + Dialog / Popover projection + + + +

Top-layer projection test

+

+ Verifies that <dialog>.showModal() and the popover API escape + the <virtual-frame> stacking / clipping context via the browser's top layer. +

+ +
+
+

Native <dialog>

+

Modal. Should cover the entire host viewport — not just the frame.

+ +
+ +
+

Popover API

+

Non-modal. Should appear above everything with no manual z-index.

+ +
+ +
+

Nested in clipped parent

+

+ Dialog triggered from inside an overflow: hidden ancestor. The top layer + should still let it escape. +

+
+
+ +
+
+
+
+ +
+

Event log

+

Events fire on the source iframe — interactions on the projection are proxied.

+
Waiting for events…
+
+ + + +

Sign-in required

+

+ This dialog was opened via showModal(). If you're reading this inside the + projection and it covers the whole page, top-layer escape works. +

+
+ + +
+
+ + +
+
+ + +
+

I'm a popover

+

Opened via the popovertarget attribute. ESC or click-outside closes me.

+ +
+ + + + diff --git a/examples/vanilla/index.html b/examples/vanilla/index.html index 88e0c26..a8cbaaf 100644 --- a/examples/vanilla/index.html +++ b/examples/vanilla/index.html @@ -174,6 +174,7 @@

How it works

+