mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-13 13:17:50 +08:00
Prevent tab key from bubbling when the completer is open
This commit is contained in:
parent
d37ffe91b7
commit
dc6355ffb7
@ -250,7 +250,16 @@ var IPython = (function (IPython) {
|
||||
});
|
||||
this.sel.blur($.proxy(this.close, this));
|
||||
this.sel.keydown(function (event) {
|
||||
that.keydown(event);
|
||||
// Ignore tab key since it causes the completer to reshow on some
|
||||
// machines and not with others. This strange behavior is due to
|
||||
// the fact that we are tricking the notebook into thinking that it
|
||||
// is in edit mode when it's really not.
|
||||
if (IPython.keyboard.event_to_shortcut(event)=='tab') {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
} else {
|
||||
that.keydown(event);
|
||||
}
|
||||
});
|
||||
this.sel.keypress(function (event) {
|
||||
that.keypress(event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user