readthedocs / readthedocs-sphinx-search

Deprecated: Enable search-as-you-type feature for docs hosted by RTD.
https://readthedocs-sphinx-search.readthedocs.io/
MIT License
33 stars 16 forks source link

Don't clear old search term when entering new search term #58

Closed jmdejong closed 4 years ago

jmdejong commented 4 years ago

When searching for a certain term, that term is displayed in the search bar. When clicking the search bar, a search window pops up with a new empty search input. The old search term is not in the input anymore.

This is annoying when the new search term is very similar to the old search term; for example when you made a typo in the old search term and you want to correct that. There is no way to change the search term without completely re-entering the search term.

My prefered solution would be to show the old search term in the search input field by default. Clearing the field manually is only a minimal effort. If the text is selected then clearing it is usually only one keypress of any key except an arrow key. Search inputs for all other websites that I know of work like this.

(original issue)