Disable autocorrect on mobile search inputs

Fixes #292
main
Ben Busby 2021-04-21 10:48:26 -04:00
parent 8fa0e7f093
commit 2eb33007f7
No known key found for this signature in database
GPG Key ID: 3B08611DF6E62ED2
2 changed files with 42 additions and 8 deletions

View File

@ -11,11 +11,19 @@
</a> </a>
<div class="H0PQec" style="width: 100%;"> <div class="H0PQec" style="width: 100%;">
<div class="sbc esbc autocomplete"> <div class="sbc esbc autocomplete">
<input id="search-bar" autocapitalize="none" autocomplete="off" class="noHIxc" name="q" <input
id="search-bar"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
spellcheck="false"
class="noHIxc"
name="q"
style="background-color: {{ 'var(--whoogle-dark-result-bg)' if config.dark else 'var(--whoogle-result-bg)' }} !important; style="background-color: {{ 'var(--whoogle-dark-result-bg)' if config.dark else 'var(--whoogle-result-bg)' }} !important;
color: {{ 'var(--whoogle-dark-text)' if config.dark else 'var(--whoogle-text)' }}; color: {{ 'var(--whoogle-dark-text)' if config.dark else 'var(--whoogle-text)' }};
border: {{ '2px solid var(--whoogle-dark-element-bg)' if config.dark else '' }}; border-radius: 8px;" border: {{ '2px solid var(--whoogle-dark-element-bg)' if config.dark else '' }}; border-radius: 8px;"
spellcheck="false" type="text" value="{{ query }}"> type="text"
value="{{ query }}">
<input name="tbm" value="{{ search_type }}" style="display: none"> <input name="tbm" value="{{ search_type }}" style="display: none">
<input type="submit" style="display: none;"> <input type="submit" style="display: none;">
<div class="sc"></div> <div class="sc"></div>
@ -37,8 +45,16 @@
<form id="search-form" class="search-form" id="sf" method="POST"> <form id="search-form" class="search-form" id="sf" method="POST">
<div class="autocomplete" style="width: 100%; flex: 1"> <div class="autocomplete" style="width: 100%; flex: 1">
<div style="width: 100%; display: flex"> <div style="width: 100%; display: flex">
<input id="search-bar" autocapitalize="none" autocomplete="off" class="noHIxc" name="q" <input
spellcheck="false" type="text" value="{{ query }}" id="search-bar"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class="noHIxc"
name="q"
spellcheck="false"
type="text"
value="{{ query }}"
style="background-color: {{ 'var(--whoogle-dark-result-bg)' if config.dark else 'var(--whoogle-result-bg)' }} !important; style="background-color: {{ 'var(--whoogle-dark-result-bg)' if config.dark else 'var(--whoogle-result-bg)' }} !important;
color: {{ 'var(--whoogle-dark-text)' if config.dark else 'var(--whoogle-text)' }}; color: {{ 'var(--whoogle-dark-text)' if config.dark else 'var(--whoogle-text)' }};
border: {{ '2px solid var(--whoogle-dark-element-bg)' if config.dark else '' }}; border-radius: 8px;"> border: {{ '2px solid var(--whoogle-dark-element-bg)' if config.dark else '' }}; border-radius: 8px;">

View File

@ -42,7 +42,16 @@
<form id="search-form" action="search" method="{{ 'get' if config.get_only else 'post' }}"> <form id="search-form" action="search" method="{{ 'get' if config.get_only else 'post' }}">
<div class="search-fields"> <div class="search-fields">
<div class="autocomplete"> <div class="autocomplete">
<input type="text" name="q" id="search-bar" class="home-search" autofocus="autofocus" autocapitalize="none" autocomplete="off"> <input
type="text"
name="q"
id="search-bar"
class="home-search"
autofocus="autofocus"
autocapitalize="none"
spellcheck="false"
autocorrect="off"
autocomplete="off">
</div> </div>
<input type="submit" id="search-submit" value="Search"> <input type="submit" id="search-submit" value="Search">
</div> </div>
@ -132,7 +141,16 @@
</div> </div>
<div class="config-div config-div-custom-css"> <div class="config-div config-div-custom-css">
<label for="config-style">Custom CSS:</label> <label for="config-style">Custom CSS:</label>
<textarea name="style" id="config-style" value="">{{ config.style }}</textarea> <textarea
name="style"
id="config-style"
autocapitalize="off"
autocomplete="off"
spellcheck="false"
autocorrect="off"
value="">
{{ config.style }}
</textarea>
</div> </div>
<div class="config-div"> <div class="config-div">
<input type="submit" id="config-load" value="Load">&nbsp; <input type="submit" id="config-load" value="Load">&nbsp;