fixed-position-child-with-fo-ancestor.html (681B)
1 <!DOCTYPE html> 2 <html> 3 <title>Test that a fixed positioned child of a dialog is aligned to the viewport</title> 4 <head> 5 <link rel="match" href="fixed-position-child-with-fixed-position-cb-ref.html"> 6 <link rel="help" href="https://fullscreen.spec.whatwg.org/#new-stacking-layer"> 7 <style> 8 ::backdrop { 9 display: none; 10 } 11 #dialog { 12 outline: none; 13 } 14 </style> 15 </head> 16 <body> 17 <svg> 18 <foreignObject> 19 <dialog id="dialog"> 20 Dialog should be centered. 21 <div style="position: fixed; top: 0px; left: 0px">This fixed positioned element is aligned to viewport top-left.</div> 22 </dialog> 23 </foreignObject> 24 </svg> 25 <script> 26 dialog.showModal(); 27 </script> 28 </body> 29 </html>