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()