From 6e95d709725e445c9bb627a07e3c0196df783a9e Mon Sep 17 00:00:00 2001 From: Anton Kosyakov Date: Tue, 26 May 2020 12:05:09 +0000 Subject: [PATCH] =?UTF-8?q?[shell]=C2=A0fix=20#7891:=20clean=20up=20toDisp?= =?UTF-8?q?oseOnActiveChanged=20properly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Anton Kosyakov --- packages/core/src/browser/shell/application-shell.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/browser/shell/application-shell.ts b/packages/core/src/browser/shell/application-shell.ts index c294d3efe200a..0db8b9b83cea8 100644 --- a/packages/core/src/browser/shell/application-shell.ts +++ b/packages/core/src/browser/shell/application-shell.ts @@ -883,6 +883,7 @@ export class ApplicationShell extends Widget { * Handle a change to the active widget. */ private onActiveChanged(sender: FocusTracker, args: FocusTracker.IChangedArgs): void { + this.toDisposeOnActiveChanged.dispose(); const { newValue, oldValue } = args; if (oldValue) { let w: Widget | null = oldValue; @@ -917,7 +918,7 @@ export class ApplicationShell extends Widget { // Set the z-index so elements with `position: fixed` contained in the active widget are displayed correctly this.setZIndex(newValue.node, '1'); - // activate another widget if an active widget gets closed + // activate another widget if an active widget will be closed const onCloseRequest = newValue['onCloseRequest']; newValue['onCloseRequest'] = msg => { const currentTabBar = this.currentTabBar;