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
|
||||
function handleResize(e) {
|
||||
new ResizeObserver((entries) => {
|
||||
if (expanded) {
|
||||
if (windowWidth !== window.innerWidth) {
|
||||
collapse();
|
||||
@ -475,7 +475,5 @@ document.addEventListener("DOMContentLoaded", function(e) {
|
||||
handleScroll();
|
||||
}
|
||||
setTopMargin();
|
||||
}
|
||||
window.addEventListener("orientationchange", handleResize);
|
||||
window.addEventListener("resize", handleResize);
|
||||
}).observe(document.body);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user