scroll-position-inline-nearest.html (1078B)
1 <!DOCTYPE html> 2 <html style="writing-mode: vertical-lr;"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Fragment Navigation: inline start position should not scroll out of content range</title> 6 <link rel="help" href="https://html.spec.whatwg.org/multipage/#scroll-to-the-fragment-identifier"> 7 <link rel="author" href="mailto:mrobinson@igalia.com" title="Martin Robinson"> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 </head> 11 <body> 12 <!-- When scrolling to this fragment the viewport inline position should not 13 change because, it is already fully enclosed by the viewport and page width. --> 14 <div id="test1" style="position: absolute; top: 5000px; left: 100px; height: 100px; width: 100px;"></div> 15 <script> 16 17 var t = async_test("ScrollToFragment"); 18 t.step(() => { 19 location.hash = "test1"; 20 setTimeout(t.step_func(() => { 21 assert_true(window.scrollY > 0); 22 assert_true(window.scrollY < 5000); 23 assert_equals(window.scrollX, 0); 24 t.done(); 25 })); 26 }); 27 28 </script> 29 </body> 30 </html>