mirror of
https://github.com/redmine/redmine.git
synced 2025-11-09 23:06:05 +01:00
Focus first text field automatically (#13134).
git-svn-id: http://svn.redmine.org/redmine/trunk@12670 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -583,6 +583,12 @@ function addFormObserversForDoubleSubmit() {
|
||||
});
|
||||
}
|
||||
|
||||
function defaultFocus(){
|
||||
if ($('#content :focus').length == 0) {
|
||||
$('#content input[type=text], #content textarea').first().focus();
|
||||
}
|
||||
}
|
||||
|
||||
function blockEventPropagation(event) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
@@ -604,4 +610,5 @@ $(document).ready(function(){
|
||||
$(document).ready(setupAjaxIndicator);
|
||||
$(document).ready(hideOnLoad);
|
||||
$(document).ready(addFormObserversForDoubleSubmit);
|
||||
$(document).ready(defaultFocus);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user