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):