##// END OF EJS Templates
ESC should be handled by CM if tooltip is not on
Takeshi Kanmae -
Show More
@@ -166,7 +166,7 b' var IPython = (function (IPython) {'
166 // triger on keypress (!) otherwise inconsistent event.which depending on plateform
166 // triger on keypress (!) otherwise inconsistent event.which depending on plateform
167 // browser and keyboard layout !
167 // browser and keyboard layout !
168 // Pressing '(' , request tooltip, don't forget to reappend it
168 // Pressing '(' , request tooltip, don't forget to reappend it
169 // The second argument says to hide the tooltip if the docstring
169 // The second argument says to hide the tooltip if the docstring
170 // is actually empty
170 // is actually empty
171 IPython.tooltip.pending(that, true);
171 IPython.tooltip.pending(that, true);
172 } else if (event.which === key.UPARROW && event.type === 'keydown') {
172 } else if (event.which === key.UPARROW && event.type === 'keydown') {
@@ -179,8 +179,12 b' var IPython = (function (IPython) {'
179 return true;
179 return true;
180 };
180 };
181 } else if (event.which === key.ESC) {
181 } else if (event.which === key.ESC) {
182 IPython.tooltip.remove_and_cancel_tooltip(true);
182 if (!IPython.tooltip._hidden) {
183 return true;
183 IPython.tooltip.remove_and_cancel_tooltip(true);
184 return true;
185 } else {
186 return false;
187 }
184 } else if (event.which === key.DOWNARROW && event.type === 'keydown') {
188 } else if (event.which === key.DOWNARROW && event.type === 'keydown') {
185 // If we are not at the bottom, let CM handle the down arrow and
189 // If we are not at the bottom, let CM handle the down arrow and
186 // prevent the global keydown handler from handling it.
190 // prevent the global keydown handler from handling it.
@@ -272,7 +276,7 b' var IPython = (function (IPython) {'
272 var data = {'cell': this, 'text': text}
276 var data = {'cell': this, 'text': text}
273 $([IPython.events]).trigger('set_next_input.Notebook', data);
277 $([IPython.events]).trigger('set_next_input.Notebook', data);
274 }
278 }
275
279
276 /**
280 /**
277 * @method _handle_input_request
281 * @method _handle_input_request
278 * @private
282 * @private
General Comments 0
You need to be logged in to leave comments. Login now