typo, use keycodes object instead of magic numbers

Paul Ivanov 12 years ago
parent bf3ecdb35f
commit 15f4345ba3

@ -238,7 +238,7 @@ var IPython = (function (IPython) {
* @param {event} event -
* @return {Boolean} `true` if CodeMirror should ignore the event, `false` Otherwise
*/
CodeCell.prototype.handle_keyevent = function (editor, event) {
Cell.prototype.handle_keyevent = function (editor, event) {
// console.log('CM', this.mode, event.which, event.type)

@ -197,7 +197,7 @@ var IPython = (function (IPython) {
if (event.keyCode === keycodes.enter && (event.shiftKey || event.ctrlKey || event.altKey)) {
// Always ignore shift-enter in CodeMirror as we handle it.
return true;
} else if (event.which === 40 && event.type === 'keypress' && IPython.tooltip.time_before_tooltip >= 0) {
} else if (event.which === keycodes.down && event.type === 'keypress' && IPython.tooltip.time_before_tooltip >= 0) {
// triger on keypress (!) otherwise inconsistent event.which depending on plateform
// browser and keyboard layout !
// Pressing '(' , request tooltip, don't forget to reappend it

Loading…
Cancel
Save