From b4928d481abd9f7cd996fd4b24078a55880d21e6 Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Sat, 17 Dec 2016 21:02:44 -0500 Subject: [PATCH] =?UTF-8?q?Change=20=E2=80=98resize=E2=80=99=20cell=20even?= =?UTF-8?q?t=20to=20=E2=80=98resizeOutput=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This addresses the ‘resize’ event bubbling issue mentioned in https://bugs.jquery.com/ticket/9841#comment:8 by not triggering an event that will bubble up to something unrelated. --- notebook/static/notebook/js/outputarea.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notebook/static/notebook/js/outputarea.js b/notebook/static/notebook/js/outputarea.js index 35abc18c35..4d14cf4d37 100644 --- a/notebook/static/notebook/js/outputarea.js +++ b/notebook/static/notebook/js/outputarea.js @@ -112,7 +112,7 @@ define([ this.prompt_overlay.dblclick(function () { that.toggle_output(); }); this.prompt_overlay.click(function () { that.toggle_scroll(); }); - this.element.resize(function () { + this.element.on('resizeOutput', function () { // maybe scroll output, // if it's grown large enough and hasn't already been scrolled. if (!that.scrolled && that._should_scroll()) { @@ -343,7 +343,7 @@ define([ this._needs_height_reset = false; } - this.element.trigger('resize'); + this.element.trigger('resizeOutput'); }; OutputArea.prototype.create_output_area = function () {