Ver Fonte

Fix command mode changing

Steven Silvester há 8 anos atrás
pai
commit
7f3da51b1a
1 ficheiros alterados com 4 adições e 0 exclusões
  1. 4 0
      src/notebook/notebook/widget.ts

+ 4 - 0
src/notebook/notebook/widget.ts

@@ -621,6 +621,10 @@ class Notebook extends StaticNotebook {
       if (activeCell instanceof MarkdownCellWidget) {
         activeCell.rendered = false;
       }
+    } else {
+      if (this.node.contains(document.activeElement)) {
+        this.node.focus();
+      }
     }
     this.stateChanged.emit({ name: 'mode', oldValue, newValue });
     this.update();