Procházet zdrojové kódy

activate new current tab

Mehmet Bektas před 5 roky
rodič
revize
5b02edb823
1 změnil soubory, kde provedl 7 přidání a 0 odebrání
  1. 7 0
      packages/tabmanager-extension/src/index.ts

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

@@ -64,6 +64,13 @@ 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.