Преглед на файлове

Fix command mode changing

Steven Silvester преди 8 години
родител
ревизия
7f3da51b1a
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  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();