##// END OF EJS Templates
Added some comments
Jonathan Frederic -
Show More
@@ -565,6 +565,8 b' var IPython = (function (IPython) {'
565 CodeCell.prototype.unselect = function () {
565 CodeCell.prototype.unselect = function () {
566 var cont = IPython.Cell.prototype.unselect.apply(this);
566 var cont = IPython.Cell.prototype.unselect.apply(this);
567 if (cont) {
567 if (cont) {
568 // When a code cell is usnelected, make sure that the corresponding
569 // tooltip to that cell is closed.
568 IPython.tooltip.remove_and_cancel_tooltip(true);
570 IPython.tooltip.remove_and_cancel_tooltip(true);
569 }
571 }
570 return cont;
572 return cont;
@@ -259,6 +259,13 b' var IPython = (function (IPython) {'
259 this.build_gui_list(this.raw_result);
259 this.build_gui_list(this.raw_result);
260
260
261 this.sel.focus();
261 this.sel.focus();
262 // Since the completer can and will gain focus and it isn't a component
263 // of the codemirror instance, we need to manually "fake" codemirror as
264 // still being focused. This is accomplished by calling edit_mode on
265 // the cell when the completer gains focus, and command mode when the
266 // completer loses focus. If the completer was an actual, true extension
267 // of codemirror, we wouldn't have to play this game since codemirror
268 // wouldn't blur when the completer was shown.
262 this.cell.edit_mode();
269 this.cell.edit_mode();
263 IPython.keyboard_manager.disable();
270 IPython.keyboard_manager.disable();
264 // Opera sometimes ignores focusing a freshly created node
271 // Opera sometimes ignores focusing a freshly created node
@@ -284,6 +291,13 b' var IPython = (function (IPython) {'
284 Completer.prototype.close = function () {
291 Completer.prototype.close = function () {
285 this.done = true;
292 this.done = true;
286 $('#complete').remove();
293 $('#complete').remove();
294 // Since the completer can and will gain focus and it isn't a component
295 // of the codemirror instance, we need to manually "fake" codemirror as
296 // still being focused. This is accomplished by calling edit_mode on
297 // the cell when the completer gains focus, and command mode when the
298 // completer loses focus. If the completer was an actual, true extension
299 // of codemirror, we wouldn't have to play this game since codemirror
300 // wouldn't blur when the completer was shown.
287 this.cell.command_mode();
301 this.cell.command_mode();
288 IPython.keyboard_manager.enable();
302 IPython.keyboard_manager.enable();
289 };
303 };
General Comments 0
You need to be logged in to leave comments. Login now