refocus active cell on dialog close

if there is one

Otherwise, the cursor is lost on kernel restart, etc.
pull/37/head
MinRK 13 years ago
parent 99a9782eb7
commit 79d9f0f039

@ -64,6 +64,14 @@ IPython.dialog = (function (IPython) {
dialog.remove();
});
}
if (options.reselect_cell !== false) {
dialog.on("hidden", function () {
if (IPython.notebook) {
cell = IPython.notebook.get_selected_cell();
if (cell) cell.select();
}
});
}
return dialog.modal(options);
}

Loading…
Cancel
Save