From 4761f8ee99ce14f755eed0f8e6ee97ac160ecdbb 2013-06-09 21:48:42 From: MinRK Date: 2013-06-09 21:48:42 Subject: [PATCH] don't use $(document).append (it's wrong and broken) --- diff --git a/IPython/frontend/html/notebook/static/notebook/js/notebook.js b/IPython/frontend/html/notebook/static/notebook/js/notebook.js index 6ef0059..a89b762 100644 --- a/IPython/frontend/html/notebook/static/notebook/js/notebook.js +++ b/IPython/frontend/html/notebook/static/notebook/js/notebook.js @@ -1343,7 +1343,7 @@ var IPython = (function (IPython) { var that = this; var dialog = $('
'); dialog.html('Do you want to restart the current kernel? You will lose all variables defined in it.'); - $(document).append(dialog); + $(document.body).append(dialog); dialog.dialog({ resizable: false, modal: true, @@ -1934,7 +1934,7 @@ var IPython = (function (IPython) { ).css("text-align", "center") ); - $(document).append(dialog); + $(document.body).append(dialog); dialog.dialog({ resizable: false, diff --git a/IPython/frontend/html/notebook/static/notebook/js/notificationarea.js b/IPython/frontend/html/notebook/static/notebook/js/notificationarea.js index 81a18ee..b7ac857 100644 --- a/IPython/frontend/html/notebook/static/notebook/js/notificationarea.js +++ b/IPython/frontend/html/notebook/static/notebook/js/notificationarea.js @@ -99,7 +99,7 @@ var IPython = (function (IPython) { ' the notebook, but running code will no longer work until the notebook' + ' is reopened.' ); - $(document).append(dialog); + $(document.body).append(dialog); dialog.dialog({ resizable: false, modal: true, @@ -136,7 +136,7 @@ var IPython = (function (IPython) { " network connection or notebook server configuration."; var dialog = $('
'); dialog.html(msg); - $(document).append(dialog); + $(document.body).append(dialog); dialog.dialog({ resizable: false, modal: true, diff --git a/IPython/frontend/html/notebook/static/notebook/js/savewidget.js b/IPython/frontend/html/notebook/static/notebook/js/savewidget.js index dc9f845..f13bf4b 100644 --- a/IPython/frontend/html/notebook/static/notebook/js/savewidget.js +++ b/IPython/frontend/html/notebook/static/notebook/js/savewidget.js @@ -79,7 +79,7 @@ var IPython = (function (IPython) { .addClass('ui-widget ui-widget-content') .attr('value',IPython.notebook.get_notebook_name()) ); - // $(document).append(dialog); + // $(document.body).append(dialog); dialog.dialog({ resizable: false, modal: true,