Browse Source

Don’t activate the notebook by default (putting the notebook into command mode)

Jason Grout 6 years ago
parent
commit
5254411c0b
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/notebook-extension/src/index.ts

+ 3 - 1
packages/notebook-extension/src/index.ts

@@ -769,7 +769,9 @@ function addCommands(app: JupyterLab, services: ServiceManager, tracker: Noteboo
   commands.addCommand(CommandIDs.runInConsole, {
     label: 'Run Selected Text or Current Line in Console',
     execute: args => {
-      const current = getCurrent(args);
+      // Default to not activating the notebook (thereby putting the notebook
+      // into command mode)
+      const current = getCurrent({activate: false, ...args});
 
       if (current) {
         const { context, content } = current;