sphinx_rtd_theme icon indicating copy to clipboard operation
sphinx_rtd_theme copied to clipboard

Make search popup optional

Open neuschaefer opened this issue 1 year ago • 0 comments

Problem

Since a few versions, clicking the search field in the navigation sidebar opens a popup[^1] and blurs the background.

Image

This may be undesirable for some users, because it violates a few basic assumptions about the search field:

  • Since it looks like an input element (and indeed it is, on the HTML level), clicking into it should allow the user to enter text into it.
  • Clicking into it should be idempotent, i.e. clicking into it twice should have the same effect as clicking into it once.
    • What happens instead is that the first click opens the search popup and the second click closes it again.

Reproducible Project

https://sphinx-rtd-theme.readthedocs.io/en/stable/

Error Logs/Results

None (purely a UX issue after a recent UI change).

Expected Results

Add an option to the sphinx_rtd_theme configuration to allow developers to opt out of using the search popup. If set, the search field works as usual and complies with the assumptions stated above.

Environment Info

  • Python Version: None
  • Sphinx Version: something recent
  • RTD Theme Version: something recent (haven't checked git)

[^1]: It isn't technically the kind of popup that was mostly forbidden by browsers since the 90s, but it still serves the same role for the user.

neuschaefer avatar Mar 31 '25 07:03 neuschaefer