ESC should be handled by CM if tooltip is not on

This commit is contained in:
Takeshi Kanmae 2013-09-07 13:21:27 -08:00
parent 5e590218f2
commit a11ebc8b0a

View File

@ -179,8 +179,12 @@ var IPython = (function (IPython) {
return true;
};
} else if (event.which === key.ESC) {
if (!IPython.tooltip._hidden) {
IPython.tooltip.remove_and_cancel_tooltip(true);
return true;
} else {
return false;
}
} else if (event.which === key.DOWNARROW && event.type === 'keydown') {
// If we are not at the bottom, let CM handle the down arrow and
// prevent the global keydown handler from handling it.