8338190: TOC vertical offsets not updated when document size changes
Reviewed-by: jjg
This commit is contained in:
parent
6460b30048
commit
c7690c34c2
@ -461,7 +461,7 @@ document.addEventListener("DOMContentLoaded", function(e) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// Resize handler
|
// Resize handler
|
||||||
function handleResize(e) {
|
new ResizeObserver((entries) => {
|
||||||
if (expanded) {
|
if (expanded) {
|
||||||
if (windowWidth !== window.innerWidth) {
|
if (windowWidth !== window.innerWidth) {
|
||||||
collapse();
|
collapse();
|
||||||
@ -475,7 +475,5 @@ document.addEventListener("DOMContentLoaded", function(e) {
|
|||||||
handleScroll();
|
handleScroll();
|
||||||
}
|
}
|
||||||
setTopMargin();
|
setTopMargin();
|
||||||
}
|
}).observe(document.body);
|
||||||
window.addEventListener("orientationchange", handleResize);
|
|
||||||
window.addEventListener("resize", handleResize);
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user