From 4035ee0f6191afbcf0e6a3d2a7f900dab5e08780 2015-02-16 21:22:52 From: Jason Grout Date: 2015-02-16 21:22:52 Subject: [PATCH] Force display_message to be processed in order Otherwise sometimes the display message will be processed before the update message. --- diff --git a/IPython/html/static/widgets/js/widget.js b/IPython/html/static/widgets/js/widget.js index 0731867..e5f758d 100644 --- a/IPython/html/static/widgets/js/widget.js +++ b/IPython/html/static/widgets/js/widget.js @@ -155,8 +155,9 @@ define(["widgets/js/manager", this.trigger('msg:custom', msg.content.data.content); break; case 'display': - this.widget_manager.display_view(msg, this) - .catch(utils.reject('Could not process display view msg', true)); + this.state_change = this.state_change.then(function() { + that.widget_manager.display_view(msg, that); + }).catch(utils.reject('Could not process display view msg', true)); break; } },