added autofocus
This commit is contained in:
@@ -13,8 +13,8 @@
|
|||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="Title">Titel</label>
|
<label for="Title">Titel</label>
|
||||||
<input type="text" class="form-control" id="Title" required name="title"
|
<input type="text" class="form-control" id="Title" required autofocus name="title"
|
||||||
[(ngModel)]="userstory.title">
|
[(ngModel)]="userstory.title" id="titleField">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1"></div>
|
<div class="col-md-1"></div>
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ export class UserstoryFormComponent implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
this.editing = true;
|
this.editing = true;
|
||||||
}
|
}
|
||||||
|
this.focusTitleField();
|
||||||
}
|
}
|
||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
@@ -41,4 +42,8 @@ export class UserstoryFormComponent implements OnInit {
|
|||||||
onClose() {
|
onClose() {
|
||||||
this.activeModalService.dismiss(this.userstory);
|
this.activeModalService.dismiss(this.userstory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
focusTitleField() {
|
||||||
|
document.getElementById('titleField').focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user