mirror of
				https://github.com/iv-org/invidious.git
				synced 2025-10-31 04:32:02 +00:00 
			
		
		
		
	Autofocus search bar only on search homepage
This commit is contained in:
		| @@ -1,8 +1,8 @@ | ||||
| <form class="pure-form" action="/search" method="get"> | ||||
| 	<fieldset> | ||||
| 		<input type="search" id="searchbox" autocomplete="off" autocorrect="off" | ||||
| 		autocapitalize="none" spellcheck="false" autofocus name="q" | ||||
| 		placeholder="<%= translate(locale, "search") %>" | ||||
| 		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)) } %>"> | ||||
| 	</fieldset> | ||||
|   | ||||
| @@ -14,7 +14,7 @@ | ||||
|     </div> | ||||
|     <div class="pure-u-1-4"></div> | ||||
|     <div class="pure-u-1 pure-u-md-12-24 searchbar"> | ||||
|         <%= rendered "components/search_box" %> | ||||
|         <% autofocus = true %><%= rendered "components/search_box" %> | ||||
|     </div> | ||||
|     <div class="pure-u-1-4"></div> | ||||
| </div> | ||||
|   | ||||
| @@ -35,7 +35,7 @@ | ||||
|                         <a href="/" class="index-link pure-menu-heading">Invidious</a> | ||||
|                     </div> | ||||
|                     <div class="pure-u-1 pure-u-md-12-24 searchbar"> | ||||
|                         <%= rendered "components/search_box" %> | ||||
|                         <% autofocus = false %><%= rendered "components/search_box" %> | ||||
|                     </div> | ||||
|                 <% end %> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Samantaz Fox
					Samantaz Fox