blob: 637485aa33ad78e78b174fc41240b6c830d6c4dd [file] [log] [blame]
<!DOCTYPE html>
<title>Type in an onscreen sticky positioned input box should not scroll the page.</title>
<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos" />
<meta name="assert" content="This test checks that typing in an onscreen sticky positioned
input box should not scroll the page." />
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<style>
body {
height: 2000px;
}
input {
position: sticky;
top: 10px;
}
</style>
<input type="text" id="input"/>
<script>
test(() => {
var input = document.getElementById('input');
input.focus();
window.scrollTo(0, 100);
assert_not_equals(window.eventSender, undefined, 'This test requires eventSender');
eventSender.keyDown('T');
eventSender.keyDown('E');
eventSender.keyDown('S');
eventSender.keyDown('T');
assert_equals(window.scrollY, 100);
}, 'Type in the onscreen sticky input box should not scroll the page.');
</script>