From 488df3ffa89605b173b22a312e2ef6e78a7fdb5e Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Mon, 7 Jun 2021 22:12:27 +0200 Subject: [PATCH] Prevent corrections and completions in search field In particular mobile browsers use correction mechanisms on input fields. Search will often be done with technical terms or even class/method/etc names that these correction mechanisms do not know, resulting in unwanted changes. This PR deactivates these correction mechanisms. While I haven't been able to find official reference documentation on these input attributes, there are multiple sources, describing this, e.g. References: - Autocomplete: https://www.w3schools.com/howto/howto_html_autocomplete_off.asp - Spellckeck: https://www.w3schools.com/howto/howto_html_spellcheck_disable.asp I did not find official reference docs on autocorrect and autocapitalize, but they are mentioned in various sources, e.g. - https://mgearon.com/html/disable-autocomplete-autocapitalize-and-autocorrect/ - https://stackoverflow.com/questions/35513968/disable-auto-correct-in-safari-text-input - https://davidwalsh.name/disable-autocorrect and it works, as can easily be checked with a mobile device on the demos in the above links. --- sphinx/themes/basic/search.html | 2 +- sphinx/themes/basic/searchbox.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sphinx/themes/basic/search.html b/sphinx/themes/basic/search.html index 5ba3c017e3..e492b8d37e 100644 --- a/sphinx/themes/basic/search.html +++ b/sphinx/themes/basic/search.html @@ -37,7 +37,7 @@

{{ _('Search') }}

{% endblock %} {% block searchbox %}
- +
diff --git a/sphinx/themes/basic/searchbox.html b/sphinx/themes/basic/searchbox.html index 68f933f660..e0094cd788 100644 --- a/sphinx/themes/basic/searchbox.html +++ b/sphinx/themes/basic/searchbox.html @@ -12,7 +12,7 @@

{{ _('Quick search') }}