Skip to content

Commit 1ed0346

Browse files
committed
Clear the cached toggle position more intelligently
1 parent abffb0b commit 1ed0346

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/resources/formats/html/quarto.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,10 +363,15 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
363363
window.addEventListener(
364364
"resize",
365365
throttle(() => {
366+
elRect = undefined;
366367
positionToggle();
367368
}, 50)
368369
);
369370

371+
window.addEventListener("quarto-hrChanged", () => {
372+
elRect = undefined;
373+
});
374+
370375
// Process the click
371376
clickEl.onclick = () => {
372377
if (!tocShowing) {

0 commit comments

Comments
 (0)