Skip to content

Commit

Permalink
[shell] fix #7891: clean up toDisposeOnActiveChanged properly
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
  • Loading branch information
akosyakov committed May 26, 2020
1 parent aba96c7 commit 1bc44b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/browser/shell/application-shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,7 @@ export class ApplicationShell extends Widget {
* Handle a change to the active widget.
*/
private onActiveChanged(sender: FocusTracker<Widget>, args: FocusTracker.IChangedArgs<Widget>): void {
this.toDisposeOnActiveChanged.dispose();
const { newValue, oldValue } = args;
if (oldValue) {
let w: Widget | null = oldValue;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1bc44b3

Please sign in to comment.