pradyunsg / furo

A clean customizable documentation theme for Sphinx
https://pradyunsg.me/furo/quickstart
MIT License
2.76k stars 317 forks source link

Small webpage search bar can invisibly activated with / #515

Open PowerUser64 opened 2 years ago

PowerUser64 commented 2 years ago

What's happening?

If you go to a website using this theme (ex: manual.zrythm.org) and reduce the horizontal size of your window, the sidebar on the left that contains the search bar will collapse. This is fine and expected. From here, the search bar can still be focused by pressing the / key. This is also fine, but the real problem is that the search bar is remains hidden in the side menu. To solve this, I would suggest expanding the collapsed sidebar with the search bar or adding another search bar that appears at the top of the page when the / key is pressed.

Reproducer

  1. Go to a website using this theme, like https://manual.zrythm.org
  2. Horizontally resize your browser window until the sidebar on the left disappears ("mobile view")
  3. Press the / key to search
  4. The search bar is now activated and you can type in it, but it is still in a non-visible area of the webpage.

Expectation

Instead of invisibly activating (and stealing your keyboard in the process), the search box should appear as a drop-down search box from the top of the page (maybe consider adding a search button in the upper right), or the left panel should expand to reveal the search box.

Code of Conduct

timhoffm commented 4 months ago

Maybe the way to go here is what https://pydata-sphinx-theme.readthedocs.io/en/stable/ is doing. They add an overlay for the input box when one activates search.