mirror of
https://github.com/Eugeny/tabby.git
synced 2025-09-24 09:06:03 +00:00
Move focus to RenameTabModalComponent onInit
This commit is contained in:
@@ -16,6 +16,7 @@ export class RenameTabModalComponent {
|
|||||||
ngOnInit () {
|
ngOnInit () {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.input.nativeElement.focus()
|
this.input.nativeElement.focus()
|
||||||
|
this.input.nativeElement.select()
|
||||||
}, 250)
|
}, 250)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -63,10 +63,6 @@ export class TabHeaderComponent {
|
|||||||
showRenameTabModal (): void {
|
showRenameTabModal (): void {
|
||||||
let modal = this.ngbModal.open(RenameTabModalComponent)
|
let modal = this.ngbModal.open(RenameTabModalComponent)
|
||||||
modal.componentInstance.value = this.tab.customTitle || this.tab.title
|
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 => {
|
modal.result.then(result => {
|
||||||
this.tab.setTitle(result)
|
this.tab.setTitle(result)
|
||||||
this.tab.customTitle = result
|
this.tab.customTitle = result
|
||||||
|
Reference in New Issue
Block a user