mirror of
https://github.com/redmine/redmine.git
synced 2025-11-10 07:16:03 +01:00
Focus the first text input or submit button when showing a modal box.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8873 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -314,9 +314,10 @@ function showModal(id, width) {
|
|||||||
el.addClassName('modal');
|
el.addClassName('modal');
|
||||||
el.show();
|
el.show();
|
||||||
|
|
||||||
var submit = el.down("input[type=submit]");
|
if (el.down("input[type=text]")) {
|
||||||
if (submit) {
|
el.down("input[type=text]").focus();
|
||||||
submit.focus();
|
} else if (el.down("input[type=submit]")) {
|
||||||
|
el.down("input[type=submit]").focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user