Skip to content

Commit

Permalink
Merge pull request #7349 from mbektasbbg/fix_tab_close_activation_issue
Browse files Browse the repository at this point in the history
Activate new current tab
  • Loading branch information
Steven Silvester committed Dec 12, 2019
2 parents 92913c4 + 23e90b3 commit 8d773bf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/application-extension/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ const main: JupyterFrontEndPlugin<void> = {
app.commands.notifyCommandChanged();
});

// when current tab changes, activate the new current tab
// if there isn't an active tab
app.shell.currentChanged.connect((sender, args) => {
if (!app.shell.activeWidget && args.newValue) {
app.shell.activateById(args.newValue.id);
}
});

// If the connection to the server is lost, handle it with the
// connection lost handler.
connectionLost = connectionLost || ConnectionLost;
Expand Down

0 comments on commit 8d773bf

Please sign in to comment.