aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-07-27 04:43:14 +0200
committerGitHub <noreply@github.com>2020-07-26 22:43:14 -0400
commit859094ef0a1db915278e344b29c3fc47514c4249 (patch)
tree31629c140c84ff603da0a0197d368ee7651a86a4 /templates
parente6c9f19b8f712c01456cafb2225950825dcc1ce9 (diff)
downloadgitea-859094ef0a1db915278e344b29c3fc47514c4249.tar.gz
gitea-859094ef0a1db915278e344b29c3fc47514c4249.zip
Disable search box autofocus on issue/pr pages (#12229)
Various pages like the issue list autofocus their search box which I find rather intrusive because more often than not I don't want to type into the search box, it's distracting if the focus jumps after page load. Disable this behaviour. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/search.tmpl2
-rw-r--r--templates/user/dashboard/issues.tmpl2
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/issue/search.tmpl b/templates/repo/issue/search.tmpl
index c51d4c906c..f7ca49e663 100644
--- a/templates/repo/issue/search.tmpl
+++ b/templates/repo/issue/search.tmpl
@@ -5,7 +5,7 @@
<input type="hidden" name="labels" value="{{.SelectLabels}}"/>
<input type="hidden" name="milestone" value="{{$.MilestoneID}}"/>
<input type="hidden" name="assignee" value="{{$.AssigneeID}}"/>
- <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
+ <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}...">
<button class="ui blue button" type="submit">{{.i18n.Tr "explore.search"}}</button>
</div>
</form>
diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl
index c3e8f23761..6acb9c0607 100644
--- a/templates/user/dashboard/issues.tmpl
+++ b/templates/user/dashboard/issues.tmpl
@@ -72,7 +72,7 @@
<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}}%2C{{end}}]"/>
<input type="hidden" name="sort" value="{{$.SortType}}"/>
<input type="hidden" name="state" value="{{$.State}}"/>
- <input name="q" value="{{$.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus>
+ <input name="q" value="{{$.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}...">
<button class="ui blue button" type="submit">{{.i18n.Tr "explore.search"}}</button>
</div>
</form>