Repository navigation
Closed
Description
Bug description
When using the search bar in the Quarto book template, correct results are being shown. However, when clicking on a result, leading to the corresponding chapter, the highlighting of the text disappears nearly immediately.
Steps to reproduce
Go to https://meierluk.github.io/quarto-test/, search e.g. for "Knuth" and click on the corresponding result.
Alternatively, I can also simply open https://meierluk.github.io/quarto-test/references.html?q=Knuth.
The behavior might be caused by this.
The source is based on the template and is available at https://github.com/meierluk/quarto-test/tree/main/source.
Expected behavior
The highlighting should not go away.
Actual behavior
The highlighting disappears.
Your environment
- IDE RStudio 2024.04.1 Build 748
- OS: Windows 11
Quarto check output
Quarto 1.4.554
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.69.5: OK
Deno version 1.37.2: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.4.554
Path: C:\Users\meierluk\AppData\Local\Programs\Quarto\bin
CodePage: 1252
[>] Checking tools....................OK
TinyTeX: v2024.04
Chromium: (not installed)
[>] Checking LaTeX....................OK
Using: TinyTex
Path: C:\Users\meierluk\AppData\Roaming\TinyTeX\bin\windows\
Version: 2024
[>] Checking basic markdown render....OK
[>] Checking Python 3 installation....OK
Version: 3.10.0
Path: C:/Users/meierluk/AppData/Local/Programs/Python/Python310/python.exe
Jupyter: 4.9.2
Kernels: julia-1.9, python3
(\) Checking Jupyter engine render....Traceback (most recent call last):
File "C:\Users\meierluk\AppData\Local\Programs\Quarto\share\jupyter\jupyter.py", line 21, in <module>
from notebook import notebook_execute, RestartKernel
File "C:\Users\meierluk\AppData\Local\Programs\Quarto\share\jupyter\notebook.py", line 14, in <module>
from yaml import safe_load
ModuleNotFoundError: No module named 'yaml'
[>] Checking Jupyter engine render....OK
Reacted by olivroy and Pallas Cain
Activity
temporary fix for quarto search term highlighting bug
jtbayly commentedon Sep 27, 2025
In my pull request, I simply removed the code that clears the highlights on search terms. I don't understand why just because somebody scrolls we would want the highlight on the search term to disappear. Obviously it was an intentional design decision, but so was highlighting the search terms, which currently doesn't happen.
mcanouil commentedon Sep 27, 2025
For reference (look in thread):
cderv commentedon Feb 20, 2026
Fixed by PR #13442 which removes scroll-based highlight clearing entirely. Search highlights now persist until navigation or query change.
Playwright test coverage for the expected behavior is coming in PR #14049.
Add test coverage for search highlight persistence (#14047, #9802)
Add test coverage for search highlight persistence (#14047, #9802) (#…