diff --git a/IPython/html/static/base/js/keyboard.js b/IPython/html/static/base/js/keyboard.js
index 952c384c1..7a8a80f26 100644
--- a/IPython/html/static/base/js/keyboard.js
+++ b/IPython/html/static/base/js/keyboard.js
@@ -189,7 +189,7 @@ IPython.keyboard = (function (IPython) {
this._shortcuts[shortcut] = data;
if (!suppress_help_update) {
// update the keyboard shortcuts notebook help
- IPython.quick_help = new IPython.QuickHelp();
+ $([IPython.events]).trigger('rebuild.QuickHelp')
}
}
@@ -209,7 +209,7 @@ IPython.keyboard = (function (IPython) {
IPython.quick_help = new IPython.QuickHelp();
if (!suppress_help_update) {
// update the keyboard shortcuts notebook help
- IPython.quick_help = new IPython.QuickHelp();
+ $([IPython.events]).trigger('rebuild.QuickHelp');
}
}
diff --git a/IPython/html/static/notebook/js/quickhelp.js b/IPython/html/static/notebook/js/quickhelp.js
index 29cb3def6..907e2d0d0 100644
--- a/IPython/html/static/notebook/js/quickhelp.js
+++ b/IPython/html/static/notebook/js/quickhelp.js
@@ -18,6 +18,10 @@ var IPython = (function (IPython) {
QuickHelp.prototype.show_keyboard_shortcuts = function () {
// toggles display of keyboard shortcut dialog
var that = this;
+ if ( this.force_rebuild ) {
+ delete(this.shortcut_dialog);
+ this.force_rebuild = false;
+ }
if ( this.shortcut_dialog ){
// if dialog is already shown, close it
$(this.shortcut_dialog).modal("toggle");
@@ -57,6 +61,8 @@ var IPython = (function (IPython) {
Close : {}
}
});
+
+ $([IPython.events]).on('rebuild.QuickHelp', function() { that.force_rebuild = true;});
};
QuickHelp.prototype.build_command_help = function () {