diff --git a/IPython/frontend/html/notebook/static/base/js/dialog.js b/IPython/frontend/html/notebook/static/base/js/dialog.js index a792a179b..92d2e3cc1 100644 --- a/IPython/frontend/html/notebook/static/base/js/dialog.js +++ b/IPython/frontend/html/notebook/static/base/js/dialog.js @@ -65,10 +65,7 @@ IPython.dialog = (function (IPython) { }); } - dialog.modal(options); - // setTimeout(function() { - // footer.find("button").last().focus() - // }, 0); + return dialog.modal(options); } return { diff --git a/IPython/frontend/html/notebook/static/notebook/js/quickhelp.js b/IPython/frontend/html/notebook/static/notebook/js/quickhelp.js index 5bf0b1910..3473a41fe 100644 --- a/IPython/frontend/html/notebook/static/notebook/js/quickhelp.js +++ b/IPython/frontend/html/notebook/static/notebook/js/quickhelp.js @@ -19,12 +19,11 @@ var IPython = (function (IPython) { var that = this; if ( this.shortcut_dialog ){ // if dialog is already shown, close it - this.shortcut_dialog.dialog("close"); + this.shortcut_dialog.find("button").first().click(); this.shortcut_dialog = null; return; } - var dialog = $('
'); - this.shortcut_dialog = dialog; + var body = $(''); var shortcuts = [ {key: 'Shift-Enter', help: 'run cell'}, {key: 'Ctrl-Enter', help: 'run cell in-place'}, @@ -53,16 +52,19 @@ var IPython = (function (IPython) { {key: 'Ctrl-m h', help: 'show keyboard shortcuts'} ]; for (var i=0; i