You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
height: calc(100vh + 200px); /* At least 200px of scroll range */
}
</style>
<table>
<thead>
<tr>
<th>1
<th>1
<th>1
<th>1
</tr>
</thead>
<thead id="hidden">
<tr>
<th>1
<th>1
<th>1
<th>1
</tr>
</thead>
<tbody>
<tr><td>0 <td>0 <td>0 <td>0 </tr>
<tr><td>0 <td>0 <td>0 <td>0 </tr>
<tr><td>0 <td>0 <td>0 <td>0 </tr>
<tr><td>0 <td>0 <td>0 <td>0 </tr>
<tr><td>0 <td>0 <td>0 <td>0 </tr>
<tr><td>0 <td>0 <td>0 <td>0 </tr>
<tr><td>0 <td>0 <td>0 <td>0 </tr>
</tbody>
</table>
<div id="spacer"></div>
<script>
let isFirstEvent = true;
const targetScrollPosition = 100;
const hidden = document.querySelector("#hidden");
const t = async_test("Scroll offset doesn't get stuck in infinite scroll events when an element goes back and forth to display: none while changing abspos style");
window.onscroll = t.step_func(function() {
hidden.style.display = "block";
hidden.style.position = "absolute";
hidden.style.visibility = "hidden";
window.unused = hidden.offsetHeight;
hidden.style.display = "";
hidden.style.position = "";
hidden.style.visibility = "";
assert_true(isFirstEvent, "Shouldn't get more than one scroll event");