From 0f59d3f36811e07901e6ad12d2adafafeb04cbec 2014-03-25 23:44:34 From: Min RK Date: 2014-03-25 23:44:34 Subject: [PATCH] Merge pull request #5430 from jdfreder/elementappend Make sure `element` is correct in the context of displayed JS --- diff --git a/IPython/html/static/notebook/js/outputarea.js b/IPython/html/static/notebook/js/outputarea.js index 47f239f..79b902e 100644 --- a/IPython/html/static/notebook/js/outputarea.js +++ b/IPython/html/static/notebook/js/outputarea.js @@ -541,6 +541,10 @@ var IPython = (function (IPython) { var container = element; container.show = function(){console.log('Warning "container.show()" is deprecated.')}; // end backward compat + + // Fix for ipython/issues/5293, make sure `element` is the area which + // output can be inserted into at the time of JS execution. + element = toinsert; try { eval(js); } catch(err) {