From 6cf6c56dd136c3e94a13852d7278fab8c6f3da7d Mon Sep 17 00:00:00 2001 From: Samantaz Fox Date: Thu, 13 Jan 2022 22:19:19 +0100 Subject: [PATCH] Autofocus search bar only on search homepage --- src/invidious/views/components/search_box.ecr | 4 ++-- src/invidious/views/search_homepage.ecr | 2 +- src/invidious/views/template.ecr | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/invidious/views/components/search_box.ecr b/src/invidious/views/components/search_box.ecr index 4144d161..1240e5bd 100644 --- a/src/invidious/views/components/search_box.ecr +++ b/src/invidious/views/components/search_box.ecr @@ -1,8 +1,8 @@
" + autocapitalize="none" spellcheck="false" <% if autofocus %>autofocus<% end %> + name="q" placeholder="<%= translate(locale, "search") %>" title="<%= translate(locale, "search") %>" value="<%= env.get?("search").try {|x| HTML.escape(x.as(String)) } %>">
diff --git a/src/invidious/views/search_homepage.ecr b/src/invidious/views/search_homepage.ecr index 45561d1e..2424a1cf 100644 --- a/src/invidious/views/search_homepage.ecr +++ b/src/invidious/views/search_homepage.ecr @@ -14,7 +14,7 @@
diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr index efa434bf..240b523a 100644 --- a/src/invidious/views/template.ecr +++ b/src/invidious/views/template.ecr @@ -35,7 +35,7 @@ Invidious <% end %>