mirror of https://github.com/Eugeny/tabby.git
Move focus to RenameTabModalComponent onInit
This commit is contained in:
parent
6b823d0fa0
commit
fcf14eaa8b
|
|
@ -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 New Issue