mirror of
https://github.com/jupyter/notebook.git
synced 2025-02-11 12:30:51 +08:00
Merge pull request #1821 from ellisonbg/nbrename-enter
ENTER submits the rename notebook dialog.
This commit is contained in:
commit
aa19b3feb6
@ -94,6 +94,15 @@ var IPython = (function (IPython) {
|
||||
"Cancel": function () {
|
||||
$(this).dialog('close');
|
||||
}
|
||||
},
|
||||
open : function (event, ui) {
|
||||
var that = $(this);
|
||||
// Upon ENTER, click the OK button.
|
||||
that.find('input[type="text"]').keydown(function (event, ui) {
|
||||
if (event.which === utils.keycodes.ENTER) {
|
||||
that.parent().find('button').first().click();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user