fix page toc scroll issue

This commit is contained in:
Antoine Vandevenne (anv) 2021-02-19 17:52:04 +01:00
parent bb72f44bd3
commit d810e0c0f3

View File

@ -102,10 +102,10 @@
});
let timeoutId = undefined;
document.addEventListener('scroll', () => {
clearTimeout(timeoutId); // For each scroll event, cancel the previous timeout callback
timeoutId = setTimeout(() => {
clickedHeadingRef = undefined; // Go back to highlighting the heading ref in view
}, 100);
clearTimeout(timeoutId); // For each scroll event, cancel the previous timeout callback
_updateFlags();
});