From 9e8c0ccb143d0a297667f95da26edcd3726b970c Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Sun, 16 Aug 2020 18:30:42 +0200 Subject: [PATCH] restore all split tab children at once --- terminus-core/src/components/splitTab.component.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/terminus-core/src/components/splitTab.component.ts b/terminus-core/src/components/splitTab.component.ts index eef42015..7ea5686c 100644 --- a/terminus-core/src/components/splitTab.component.ts +++ b/terminus-core/src/components/splitTab.component.ts @@ -258,12 +258,13 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit if (this._recoveredState) { await this.recoverContainer(this.root, this._recoveredState) this.layout() - setImmediate(() => { + setTimeout(() => { if (this.hasFocus) { - this.getAllTabs().forEach(x => x.emitFocused()) - this.focusAnyIn(this.root) + for (const tab of this.getAllTabs()) { + this.focus(tab) + } } - }) + }, 100) } this.initialized.next() this.initialized.complete()