瀏覽代碼

clean up logic

Steven Silvester 7 年之前
父節點
當前提交
a4bdcdbe90
共有 1 個文件被更改,包括 1 次插入1 次删除
  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';