autofocus for new and edit issue forms
This commit is contained in:
parent
e6b3eb115a
commit
b92bb77b54
2 changed files with 2 additions and 1 deletions
|
@ -770,6 +770,7 @@ function initIssue() {
|
||||||
$("#issue-edit-btn").on("click", function () {
|
$("#issue-edit-btn").on("click", function () {
|
||||||
$('#issue h1.title,#issue .issue-main > .issue-content .content,#issue-edit-btn').toggleHide();
|
$('#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-title,.issue-edit-content,.issue-edit-cancel,.issue-edit-save').toggleShow();
|
||||||
|
$('#issue-edit-content').focus();
|
||||||
});
|
});
|
||||||
$('.issue-edit-cancel').on("click", function () {
|
$('.issue-edit-cancel').on("click", function () {
|
||||||
$('#issue h1.title,#issue .issue-main > .issue-content .content,#issue-edit-btn').toggleShow();
|
$('#issue h1.title,#issue .issue-main > .issue-content .content,#issue-edit-btn').toggleShow();
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8 panel panel-default">
|
<div class="col-md-8 panel panel-default">
|
||||||
<div class="form-group panel-body">
|
<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>
|
||||||
<div class="form-group panel-body">
|
<div class="form-group panel-body">
|
||||||
{{if .IsRepositoryOwner}}
|
{{if .IsRepositoryOwner}}
|
||||||
|
|
Reference in a new issue