From c0ec02bdb4c3359cd62ecad4bb922253e897ad23 Mon Sep 17 00:00:00 2001 From: MinRK Date: Tue, 6 Aug 2013 19:30:48 -0700 Subject: [PATCH] swallow enter event in rename dialog avoids adding newline in cell after dialog is closed. closes #3926 --- IPython/html/static/notebook/js/savewidget.js | 1 + 1 file changed, 1 insertion(+) diff --git a/IPython/html/static/notebook/js/savewidget.js b/IPython/html/static/notebook/js/savewidget.js index e83399f4a..e049a71f2 100644 --- a/IPython/html/static/notebook/js/savewidget.js +++ b/IPython/html/static/notebook/js/savewidget.js @@ -100,6 +100,7 @@ var IPython = (function (IPython) { that.find('input[type="text"]').keydown(function (event, ui) { if (event.which === utils.keycodes.ENTER) { that.find('.btn-primary').first().click(); + return false; } }); that.find('input[type="text"]').focus();