mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	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>
This commit is contained in:
		@@ -5,7 +5,7 @@
 | 
				
			|||||||
		<input type="hidden" name="labels" value="{{.SelectLabels}}"/>
 | 
							<input type="hidden" name="labels" value="{{.SelectLabels}}"/>
 | 
				
			||||||
		<input type="hidden" name="milestone" value="{{$.MilestoneID}}"/>
 | 
							<input type="hidden" name="milestone" value="{{$.MilestoneID}}"/>
 | 
				
			||||||
		<input type="hidden" name="assignee" value="{{$.AssigneeID}}"/>
 | 
							<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>
 | 
							<button class="ui blue button" type="submit">{{.i18n.Tr "explore.search"}}</button>
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</form>
 | 
					</form>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -72,7 +72,7 @@
 | 
				
			|||||||
								<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}}%2C{{end}}]"/>
 | 
													<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}}%2C{{end}}]"/>
 | 
				
			||||||
								<input type="hidden" name="sort" value="{{$.SortType}}"/>
 | 
													<input type="hidden" name="sort" value="{{$.SortType}}"/>
 | 
				
			||||||
								<input type="hidden" name="state" value="{{$.State}}"/>
 | 
													<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>
 | 
													<button class="ui blue button" type="submit">{{.i18n.Tr "explore.search"}}</button>
 | 
				
			||||||
							</div>
 | 
												</div>
 | 
				
			||||||
						</form>
 | 
											</form>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user