fune/dom/base/test/file_suppressed_events_and_scrolling.html
Olli Pettay 50a110f8af Bug 1726364 - Scroll events stop working after synchronous XHR request while scrolling an iframe, r=edgar
I tried to keep the changes minimal in this case.
We may need some more changes to Document::UnsuppressEventHandlingAndFireEvents to make it work
well with Fission (but that Fission work is totally unrelated to this fix).

Differential Revision: https://phabricator.services.mozilla.com/D123389
2021-08-24 11:43:06 +00:00

30 lines
821 B
HTML

<!DOCTYPE HTML>
<html>
<body><iframe srcdoc="
<html>
<head>
<script>
onload = function() {
// Ensure the layout is up-to-date and painted.
requestAnimationFrame(function() {
setTimeout(run);
})
}
function run() {
parent.opener.postMessage('doscroll', '*');
window.onscroll = function() {
parent.opener.postMessage('didscroll', '*');
}
let xhr = new XMLHttpRequest();
xhr.open('GET', 'slow.sjs', false);
xhr.send();
parent.opener.postMessage('xhr_done', '*');
}
</script>
</head>
<body style='height: 3000px; border: 1px solid black;'>
</body>
</html>
"></iframe></body>
</html>