Fixing #1337. Tooltip stops TAB from being handled by others.

Pressing TAB to get the tooltip "range(TAB" was inserting a TAB.
To get rid of this we are now telling CodeMirror to ignore it
and also stopping the event from bubbling up the DOM.
Brian Granger 14 years ago
parent e5bc1eef59
commit f9ce3fa493

@ -123,6 +123,10 @@ var IPython = (function (IPython) {
return false;
} else if ((pre_cursor.substr(-1) === "("|| pre_cursor.substr(-1) === " ") && tooltip_on_tab ) {
that.request_tooltip_after_time(pre_cursor,0);
// Prevent the event from bubbling up.
event.stop();
// Prevent CodeMirror from handling the tab.
return true;
} else {
pre_cursor.trim();
// Autocomplete the current line.

Loading…
Cancel
Save