Переглянути джерело

Bug fix: give console prompt editor focus after execution.

Afshin Darian 8 роки тому
батько
коміт
cf6809cff9

+ 1 - 1
packages/console-extension/src/index.ts

@@ -248,7 +248,7 @@ function activateConsole(app: JupyterLab, services: IServiceManager, rendermime:
       if (!current) {
         return;
       }
-      current.console.execute();
+      return current.console.execute();
     }
   });
   palette.addItem({ command, category });

+ 1 - 3
packages/console/src/widget.ts

@@ -430,10 +430,8 @@ class CodeConsole extends Widget {
     editor.addKeydownHandler(this._onEditorKeydown);
 
     this._history.editor = editor;
-
     if (this.isAttached) {
-      prompt.editor.focus();
-      this.update();
+      this.activate();
     }
     this._promptCreated.emit(prompt);
   }