mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
directly blur codemirror to trigger command-mode
rather than focusing the cell, which implies codemirror blur
This commit is contained in:
parent
581d6ca158
commit
effbd91b77
@ -663,10 +663,9 @@ define(function (require) {
|
|||||||
Notebook.prototype.command_mode = function () {
|
Notebook.prototype.command_mode = function () {
|
||||||
var cell = this.get_cell(this.get_edit_index());
|
var cell = this.get_cell(this.get_edit_index());
|
||||||
if (cell && this.mode !== 'command') {
|
if (cell && this.mode !== 'command') {
|
||||||
// We don't call cell.command_mode, but rather call cell.focus_cell()
|
// We don't call cell.command_mode, but rather blur the CM editor
|
||||||
// which will blur and CM editor and trigger the call to
|
// which will trigger the call to handle_command_mode.
|
||||||
// handle_command_mode.
|
cell.code_mirror.getInputField().blur();
|
||||||
cell.focus_cell();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user