Browse Source

Merge pull request #989 from blink1073/fix-unrendered-markdown

Fix switching to rendered markdown cell in edit mode
Brian E. Granger 8 years ago
parent
commit
a004bfe856
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/notebook/notebook/widget.ts

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

@@ -661,6 +661,9 @@ class Notebook extends StaticNotebook {
     if (newValue === oldValue) {
       return;
     }
+    if (this.mode === 'edit' && cell instanceof MarkdownCellWidget) {
+      cell.rendered = false;
+    }
     this.stateChanged.emit({ name: 'activeCellIndex', oldValue, newValue });
   }