Steven Silvester 8 лет назад
Родитель
Сommit
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();