Ver Fonte

activate new current tab only if there isn't an active one

Mehmet Bektas há 5 anos atrás
pai
commit
23e90b339f
1 ficheiros alterados com 3 adições e 2 exclusões
  1. 3 2
      packages/application-extension/src/index.tsx

+ 3 - 2
packages/application-extension/src/index.tsx

@@ -112,9 +112,10 @@ const main: JupyterFrontEndPlugin<void> = {
       app.commands.notifyCommandChanged();
     });
 
-    // when current tab changes, make sure it is activated
+    // when current tab changes, activate the new current tab
+    // if there isn't an active tab
     app.shell.currentChanged.connect((sender, args) => {
-      if (args.newValue) {
+      if (!app.shell.activeWidget && args.newValue) {
         app.shell.activateById(args.newValue.id);
       }
     });