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

Call preventDefault() in "Esc" event listener #103

Open mgeier opened 2 years ago

mgeier commented 2 years ago

This is untested, but it should prevent the keypress to be propagated after closing the popup, which is not desired, e.g. in https://github.com/sphinx-doc/sphinx/pull/9337.

stsewd commented 2 years ago

Hi, sorry for the late review, I just hit this, but this doesn't fix the issue, I think we may need to narrow down the listener (currently set to the whole document), or may be another way to achieve this?

stsewd commented 2 years ago

This kind of works https://github.com/readthedocs/readthedocs-sphinx-search/pull/104