فهرست منبع

Add a comment

Steven Silvester 9 سال پیش
والد
کامیت
3aeb9f3d2f
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      src/notebook/notebook/widget.ts

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

@@ -796,6 +796,8 @@ class Notebook extends StaticNotebook {
    * Handle a new model.
    */
   protected onModelChanged(oldValue: INotebookModel, newValue: INotebookModel): void {
+    // Try to set the active cell index to 0.
+    // It will be set to `-1` if there is no new model or the model is empty.
     this.activeCellIndex = 0;
   }