diff options
author | 无闻 <u@gogs.io> | 2015-08-01 10:05:11 +0800 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2015-08-01 10:05:11 +0800 |
commit | 7241598c19342aebbff1cbf5246be0db0fdf0462 (patch) | |
tree | d193ce747715a70e7ef552d25b96dd31b76c6c16 | |
parent | 137e4139ed75daaca7e8c6b27b761a86b9a0ef8e (diff) | |
parent | b92bb77b547010cd770e1f79b12811c7b9c43fb4 (diff) | |
download | gitea-7241598c19342aebbff1cbf5246be0db0fdf0462.tar.gz gitea-7241598c19342aebbff1cbf5246be0db0fdf0462.zip |
Merge pull request #1426 from manfer/issues-new-edit-forms-autofocus
autofocus for new and edit issue forms
-rw-r--r-- | public/js/app.js | 1 | ||||
-rw-r--r-- | templates/repo/issue/create.tmpl | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/public/js/app.js b/public/js/app.js index 61539148e9..6208dbedc8 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -770,6 +770,7 @@ function initIssue() { $("#issue-edit-btn").on("click", function () { $('#issue h1.title,#issue .issue-main > .issue-content .content,#issue-edit-btn').toggleHide(); $('#issue-edit-title,.issue-edit-content,.issue-edit-cancel,.issue-edit-save').toggleShow(); + $('#issue-edit-content').focus(); }); $('.issue-edit-cancel').on("click", function () { $('#issue h1.title,#issue .issue-main > .issue-content .content,#issue-edit-btn').toggleShow(); diff --git a/templates/repo/issue/create.tmpl b/templates/repo/issue/create.tmpl index ed7ba3559c..de0c47ac20 100644 --- a/templates/repo/issue/create.tmpl +++ b/templates/repo/issue/create.tmpl @@ -12,7 +12,7 @@ </div> <div class="col-md-8 panel panel-default"> <div class="form-group panel-body"> - <input class="form-control input-lg" type="text" name="title" required="required" placeholder="Title" value="{{.title}}" /> + <input class="form-control input-lg" type="text" name="title" required="required" placeholder="Title" value="{{.title}}" autofocus /> </div> <div class="form-group panel-body"> {{if .IsRepositoryOwner}} |