Explorar el Código

clean up logic

Steven Silvester hace 7 años
padre
commit
a4bdcdbe90
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packages/notebook/src/widget.ts

+ 1 - 1
packages/notebook/src/widget.ts

@@ -1829,7 +1829,7 @@ class Notebook extends StaticNotebook {
       // No cell has focus, ensure command mode.
       this.mode = 'command';
     }
-    if (target !== this.node) {
+    if (this.mode === 'command' && target !== this.node) {
       delete this.node.dataset[CODE_RUNNER];
     } else {
       this.node.dataset[CODE_RUNNER] = 'true';