浏览代码

Merge pull request #930 from jasongrout/focus

Advancing after running should scroll the new cell into view.
Steven Silvester 8 年之前
父节点
当前提交
018f99f0c7
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/notebook/notebook/actions.ts

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

@@ -430,6 +430,8 @@ namespace NotebookActions {
     } else {
       widget.activeCellIndex++;
     }
+    widget.scrollToActiveCell();
+
     return promise;
   }
 
@@ -457,6 +459,7 @@ namespace NotebookActions {
     let cell = model.factory.createCodeCell();
     model.cells.insert(widget.activeCellIndex + 1, cell);
     widget.activeCellIndex++;
+    widget.scrollToActiveCell();
     widget.mode = 'edit';
     return promise;
   }