<!doctype html>
<div id="start" tabindex="0" style="overflow-y: scroll; height: 35px; margin-top: 100%">
<br><br><br>
<p>Text</p>
</div>
<p>Don't search inside or scroll the focused scrollable element when it is offscreen.</p>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="resources/snav-testharness.js"></script>
<script>
var resultMap = [
["Down", "start"], // Scroll performed at Window
];
let start = document.getElementById("start");
function postFocusMoveCheck() {
assert_equals(start.scrollTop, 0, "Offscreen scroller shouldn't be scrolled.");
}
start.focus({preventScroll:true});
test(function() {
assert_equals(window.scrollY, 0);
}, "Window shouldn't be scrolled by focus.")
snav.assertFocusMoves(resultMap, true, postFocusMoveCheck);
</script>