Browse Source

Fix the programmatic notebook scroll behavior

Steven Silvester 8 years ago
parent
commit
b3f8d26bd4
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/notebook/notebook/widget.ts

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

@@ -726,11 +726,11 @@ class Notebook extends StaticNotebook {
   }
 
   /**
-   * Scroll so that the active cell is visible in the parent widget.
+   * Scroll so that the active cell is visible.
    */
   scrollToActiveCell() {
-    if (this.parent && this.activeCell) {
-      scrollIntoViewIfNeeded(this.parent.node, this.activeCell.node);
+    if (this.activeCell) {
+      scrollIntoViewIfNeeded(this.node, this.activeCell.node);
     }
   }