fix page toc scroll issue
This commit is contained in:
parent
bb72f44bd3
commit
d810e0c0f3
@ -102,10 +102,10 @@
|
|||||||
});
|
});
|
||||||
let timeoutId = undefined;
|
let timeoutId = undefined;
|
||||||
document.addEventListener('scroll', () => {
|
document.addEventListener('scroll', () => {
|
||||||
|
clearTimeout(timeoutId); // For each scroll event, cancel the previous timeout callback
|
||||||
timeoutId = setTimeout(() => {
|
timeoutId = setTimeout(() => {
|
||||||
clickedHeadingRef = undefined; // Go back to highlighting the heading ref in view
|
clickedHeadingRef = undefined; // Go back to highlighting the heading ref in view
|
||||||
}, 100);
|
}, 100);
|
||||||
clearTimeout(timeoutId); // For each scroll event, cancel the previous timeout callback
|
|
||||||
_updateFlags();
|
_updateFlags();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user