]> source.dussan.org Git - redmine.git/commitdiff
Don't focus first input when URL contains a hash (#17757).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 4 Jul 2015 08:56:52 +0000 (08:56 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 4 Jul 2015 08:56:52 +0000 (08:56 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@14396 e93f8b46-1217-0410-a6f0-8f06a7374b81

public/javascripts/application.js

index bc56f43b2b436cc8489b875c84cdd5fc1390491d..888963a0a2f3f78abc09ef5441a8e14eaf66b7c4 100644 (file)
@@ -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();
   }
 }