Browse Source

move tab activation code to application-extension

Mehmet Bektas 5 years ago
parent
commit
3c8cabc070

+ 7 - 0
packages/application-extension/src/index.tsx

@@ -112,6 +112,13 @@ const main: JupyterFrontEndPlugin<void> = {
       app.commands.notifyCommandChanged();
     });
 
+    // when current tab changes, make sure it is activated
+    app.shell.currentChanged.connect((sender, args) => {
+      if (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;

+ 0 - 7
packages/tabmanager-extension/src/index.ts

@@ -64,13 +64,6 @@ const plugin: JupyterFrontEndPlugin<void> = {
         labShell.layoutModified.connect(() => {
           populate();
         });
-
-        // when current tab changes, make sure it is activated
-        labShell.currentChanged.connect((sender, args) => {
-          if (args.newValue) {
-            shell.activateById(args.newValue.id);
-          }
-        });
       }
 
       // Populate the tab manager.