Skip to content

Quarto Book: Highlighting of search results disappears nearly immediately #9802

Closed

Description

@meierluk

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

Activity

  1. added
    bug
    on May 30, 2024
  2. added this to the Future milestone on Jun 5, 2024
  3. added
    websites
    on Jun 6, 2024
  4. jtbayly commented on Sep 27, 2025

    @jtbayly
    Contributor

    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.

  5. mcanouil commented on Sep 27, 2025

    @mcanouil
    Collaborator
  6. cderv commented on Feb 20, 2026

    @cderv
    Member

    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.

  7. modified the milestones: Future, v1.9 on Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsearchwebsites

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions