From 4333c8490792379c4a76812f1361cd7a85df3c95 Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Fri, 22 Nov 2013 19:49:40 +0000 Subject: [PATCH] Fix scroll_to_bottom --- IPython/html/static/notebook/js/widgets/string.js | 2 +- IPython/html/widgets/widget_string.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IPython/html/static/notebook/js/widgets/string.js b/IPython/html/static/notebook/js/widgets/string.js index a94301743..d48051e9f 100644 --- a/IPython/html/static/notebook/js/widgets/string.js +++ b/IPython/html/static/notebook/js/widgets/string.js @@ -54,7 +54,7 @@ define(["notebook/js/widget"], function(widget_manager){ this.$el_to_style = this.$textbox; // Set default element to style this.update(); // Set defaults. - this.on_msg(); + this.model.on_msg($.proxy(this._handle_textarea_msg, this)); }, diff --git a/IPython/html/widgets/widget_string.py b/IPython/html/widgets/widget_string.py index 9c1b8595c..8c60eeb5a 100644 --- a/IPython/html/widgets/widget_string.py +++ b/IPython/html/widgets/widget_string.py @@ -40,7 +40,7 @@ class StringWidget(Widget): def scroll_to_bottom(self): - self._comm.send({"method": "scroll_to_bottom"}) + self.send({"method": "scroll_to_bottom"}) def _handle_string_msg(self, content):