1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-09-11 13:13:59 +03:00
This commit is contained in:
Eugene Pankov 2017-01-18 21:26:17 +01:00
parent 26ae1e3335
commit deadbed74f

View File

@ -128,7 +128,11 @@ export class AppComponent {
}
selectTab (tab) {
this.lastTabIndex = this.tabs.indexOf(this.activeTab)
if (this.tabs.includes(this.activeTab)) {
this.lastTabIndex = this.tabs.indexOf(this.activeTab)
} else {
this.lastTabIndex = null
}
this.activeTab = tab
setImmediate(() => {
this.elementRef.nativeElement.querySelector(':scope .tab.active iframe').focus()