Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/sticky-content-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<body>
<fieldset><span><span></span></span></fieldset>
<div id="host"><span></span></div>
<script>
const host = document.querySelector('#host');
const shadowRoot = host.attachShadow({mode: 'closed'});
const fieldset = shadowRoot.appendChild(document.createElement('fieldset'));
fieldset.setAttribute('style', 'overflow: scroll');
fieldset.innerHTML = '<slot></slot>';
</script>
<style>
*:not(fieldset, div) {
position: sticky;
bottom: 72pc;
}
fieldset {
overflow: visible scroll;
}
</style>
</body>