Skip to content

Commit da085a1

Browse files
committed
leave search terms highlighted if user scrolls
1 parent e858bba commit da085a1

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/resources/projects/website/search/quarto-search.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,6 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
6363
}
6464
};
6565

66-
// Clear search highlighting when the user scrolls sufficiently
67-
const resetFn = () => {
68-
resetHighlighting("");
69-
window.removeEventListener("quarto-hrChanged", resetFn);
70-
window.removeEventListener("quarto-sectionChanged", resetFn);
71-
};
72-
73-
// Register this event after the initial scrolling and settling of events
74-
// on the page
75-
window.addEventListener("quarto-hrChanged", resetFn);
76-
window.addEventListener("quarto-sectionChanged", resetFn);
77-
7866
// Responsively switch to overlay mode if the search is present on the navbar
7967
// Note that switching the sidebar to overlay mode requires more coordinate (not just
8068
// the media query since we generate different HTML for sidebar overlays than we do

0 commit comments

Comments
 (0)