Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /html/browsers/browsing-the-web/scroll-to-fragid/scroll-position-vertical-rl.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html style="writing-mode: vertical-rl;">
<head>
<meta charset="UTF-8">
<title>Fragment Navigation: Scroll to block start position in vertical-rl writing mode</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="test" style="position: absolute; top: 5px; right: 7px; margin: 5px 7px; border-style: solid; border-width: 5px 7px; padding: 5px 7px; height: 5px; width: 7px;"></div>
<div style="width: 200vw;"></div>
<script>
async_test(function (t) {
on_event(window, 'load', function () {
t.step(function () {
window.scrollTo(0, 0);
location.hash = 'test';
assert_equals(window.scrollX, -14, 'Scroll to the right border edge of #test');
});
t.done();
});
}, '');
</script>
</body>
</html>