Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 98ef540

Browse filesBrowse files
committed
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. I've also reported this upstream to sphinx at sphinx-doc/sphinx#9307. See there for more background. Our current theme uses customized templates, so we have to adapt this ourselves. You can also that this is working by accessing the CI built docs with a mobile device, and compare that with the released docs.
1 parent 63261cc commit 98ef540
Copy full SHA for 98ef540

File tree

Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed

‎doc/_templates/layout.html

Copy file name to clipboardExpand all lines: doc/_templates/layout.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<li><a href="{{ pathto('devel/index') }}">Contributing</a></li>
6464
<li class="nav-right">
6565
<form class="search" action="{{ pathto('search') }}" method="get">
66-
<input type="text" name="q" aria-labelledby="searchlabel" placeholder="Search"/>
66+
<input type="text" name="q" aria-labelledby="searchlabel" placeholder="Search" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
6767
</form>
6868
</li>
6969
</ul>

‎doc/_templates/search.html

Copy file name to clipboardExpand all lines: doc/_templates/search.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h1 id="search-documentation">{{ _('Search') }}</h1>
1717
"codex ellipse".
1818
</p>
1919
<form action="" method="get">
20-
<input type="text" name="q" value="" />
20+
<input type="text" name="q" value="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
2121
<input type="submit" value="{{ _('search') }}" />
2222
<span id="search-progress" style="padding-left: 10px"></span>
2323
</form>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.