diff options
Diffstat (limited to 'public/javascripts/application.js')
-rw-r--r-- | public/javascripts/application.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 2c4910c44..fdafc9899 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -314,10 +314,11 @@ function showModal(id, width) { el.addClassName('modal'); el.show(); - var submit = el.down("input[type=submit]"); - if (submit) { - submit.focus(); - } + if (el.down("input[type=text]")) { + el.down("input[type=text]").focus(); + } else if (el.down("input[type=submit]")) { + el.down("input[type=submit]").focus(); + } } function hideModal(el) { |