##// END OF EJS Templates
Code comments and minor fixes.
Brian E. Granger -
Show More
@@ -125,11 +125,14 b' var IPython = (function (IPython) {'
125 125 return a.has(b).length !==0 || a.is(b);
126 126 }
127 127 if (that.mode === 'edit') {
128 // Most of the time, when a cell is in edit mode and focusout
129 // fires, it means we should enter command mode. But there are cases
130 // when we should not enter command mode.
128 131 setTimeout(function () {
129 132 var trigger = true;
130 133 var target = $(document.activeElement);
131 var completer = that.element.find($('div.completions'));
132 var tooltip = $('div#tooltip')
134 var completer = $('div.completions');
135 var tooltip = $('div#tooltip');
133 136 if (target.length > 0) {
134 137 // If the focused element (target) is inside the cell
135 138 // (that.element) don't enter command mode.
@@ -218,6 +218,8 b' var IPython = (function (IPython) {'
218 218 this.complete = $('<div/>').addClass('completions');
219 219 this.complete.attr('id', 'complete');
220 220
221 // Currently webkit doesn't use the size attr correctly. See:
222 // https://code.google.com/p/chromium/issues/detail?id=4579
221 223 this.sel = $('<select style="width: auto"/>')
222 224 .attr('multiple', 'true')
223 225 .attr('size', Math.min(10, this.raw_result.length));
@@ -255,8 +257,6 b' var IPython = (function (IPython) {'
255 257 this.build_gui_list(this.raw_result);
256 258
257 259 this.sel.focus();
258 // This needs to be after the focus() call because that puts the notebook into
259 // command mode.
260 260 IPython.keyboard_manager.null_mode();
261 261 // Opera sometimes ignores focusing a freshly created node
262 262 if (window.opera) setTimeout(function () {
General Comments 0
You need to be logged in to leave comments. Login now