From 273e8f9bbef5d57e81f760131c0c721fa805bdff Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 15 Mar 2017 10:21:03 +0100 Subject: [PATCH] display_id target index is now outputs.length - 1 since item has been appended to outputs before calling instead of after --- notebook/static/notebook/js/outputarea.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/notebook/static/notebook/js/outputarea.js b/notebook/static/notebook/js/outputarea.js index ddd341360..a6d35d24d 100644 --- a/notebook/static/notebook/js/outputarea.js +++ b/notebook/static/notebook/js/outputarea.js @@ -621,7 +621,9 @@ define([ targets = this._display_id_targets[display_id] = []; } targets.push({ - index: this.outputs.length, + // output has been appended when this is called, + // so use the index of the last item. + index: this.outputs.length - 1, element: element, }); };