From ec1937479ffa9a41312281fdce80e565d33120d5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 4 Jul 2015 08:56:52 +0000 Subject: Don't focus first input when URL contains a hash (#17757). git-svn-id: http://svn.redmine.org/redmine/trunk@14396 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- public/javascripts/application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'public/javascripts') diff --git a/public/javascripts/application.js b/public/javascripts/application.js index bc56f43b2..888963a0a 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -627,7 +627,7 @@ function addFormObserversForDoubleSubmit() { } function defaultFocus(){ - if ($('#content :focus').length == 0) { + if (($('#content :focus').length == 0) && (window.location.hash == '')) { $('#content input[type=text], #content textarea').first().focus(); } } -- cgit v1.2.3