diff --git a/IPython/html/static/notebook/js/widgets/button.js b/IPython/html/static/notebook/js/widgets/button.js index 6bfb711..862d488 100644 --- a/IPython/html/static/notebook/js/widgets/button.js +++ b/IPython/html/static/notebook/js/widgets/button.js @@ -38,10 +38,11 @@ define(["notebook/js/widget"], function(){ // Frontent -> Frontend Sync update : function(){ var description = this.model.get('description'); - if (description.length==0) { - this.$el.html(' '); // Preserve button height + description.replace(' ', ' ') + if (description.length == 0) { + this.$el.html(' '); // Preserve button height } else { - this.$el.html(description); + this.$el.html(this.model.get('description')); } return IPython.WidgetView.prototype.update.call(this); diff --git a/IPython/html/static/notebook/js/widgets/selection.js b/IPython/html/static/notebook/js/widgets/selection.js index d515fb0..159649e 100644 --- a/IPython/html/static/notebook/js/widgets/selection.js +++ b/IPython/html/static/notebook/js/widgets/selection.js @@ -60,8 +60,8 @@ define(["notebook/js/widget"], function(){ update : function(){ var selected_item_text = this.model.get('value'); - selected_item_text.replace(' ', ''); - if (selected_item_text == '') { + selected_item_text.replace(' ', ' '); + if (selected_item_text.length == 0) { this.$droplabel.html(' '); } else { this.$droplabel.html(this.model.get('value'));