mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
ESC should be handled by CM if tooltip is not on
This commit is contained in:
parent
5e590218f2
commit
a11ebc8b0a
@ -179,8 +179,12 @@ var IPython = (function (IPython) {
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
} else if (event.which === key.ESC) {
|
} else if (event.which === key.ESC) {
|
||||||
|
if (!IPython.tooltip._hidden) {
|
||||||
IPython.tooltip.remove_and_cancel_tooltip(true);
|
IPython.tooltip.remove_and_cancel_tooltip(true);
|
||||||
return true;
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} else if (event.which === key.DOWNARROW && event.type === 'keydown') {
|
} else if (event.which === key.DOWNARROW && event.type === 'keydown') {
|
||||||
// If we are not at the bottom, let CM handle the down arrow and
|
// If we are not at the bottom, let CM handle the down arrow and
|
||||||
// prevent the global keydown handler from handling it.
|
// prevent the global keydown handler from handling it.
|
||||||
|
Loading…
Reference in New Issue
Block a user