mirror of
https://github.com/Eugeny/tabby
synced 2024-11-15 17:28:06 +00:00
Move focus to RenameTabModalComponent onInit
This commit is contained in:
parent
6b823d0fa0
commit
fcf14eaa8b
2 changed files with 1 additions and 4 deletions
|
@ -16,6 +16,7 @@ export class RenameTabModalComponent {
|
|||
ngOnInit () {
|
||||
setTimeout(() => {
|
||||
this.input.nativeElement.focus()
|
||||
this.input.nativeElement.select()
|
||||
}, 250)
|
||||
}
|
||||
|
||||
|
|
|
@ -63,10 +63,6 @@ export class TabHeaderComponent {
|
|||
showRenameTabModal (): void {
|
||||
let modal = this.ngbModal.open(RenameTabModalComponent)
|
||||
modal.componentInstance.value = this.tab.customTitle || this.tab.title
|
||||
setTimeout(() => {
|
||||
const inputElement = modal.componentInstance.input.nativeElement as HTMLInputElement
|
||||
inputElement.select()
|
||||
}, 250)
|
||||
modal.result.then(result => {
|
||||
this.tab.setTitle(result)
|
||||
this.tab.customTitle = result
|
||||
|
|
Loading…
Reference in a new issue