Show More
@@ -125,11 +125,14 b' var IPython = (function (IPython) {' | |||||
125 | return a.has(b).length !==0 || a.is(b); |
|
125 | return a.has(b).length !==0 || a.is(b); | |
126 | } |
|
126 | } | |
127 | if (that.mode === 'edit') { |
|
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 | setTimeout(function () { |
|
131 | setTimeout(function () { | |
129 | var trigger = true; |
|
132 | var trigger = true; | |
130 | var target = $(document.activeElement); |
|
133 | var target = $(document.activeElement); | |
131 |
var completer = |
|
134 | var completer = $('div.completions'); | |
132 | var tooltip = $('div#tooltip') |
|
135 | var tooltip = $('div#tooltip'); | |
133 | if (target.length > 0) { |
|
136 | if (target.length > 0) { | |
134 | // If the focused element (target) is inside the cell |
|
137 | // If the focused element (target) is inside the cell | |
135 | // (that.element) don't enter command mode. |
|
138 | // (that.element) don't enter command mode. |
@@ -218,6 +218,8 b' var IPython = (function (IPython) {' | |||||
218 | this.complete = $('<div/>').addClass('completions'); |
|
218 | this.complete = $('<div/>').addClass('completions'); | |
219 | this.complete.attr('id', 'complete'); |
|
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 | this.sel = $('<select style="width: auto"/>') |
|
223 | this.sel = $('<select style="width: auto"/>') | |
222 | .attr('multiple', 'true') |
|
224 | .attr('multiple', 'true') | |
223 | .attr('size', Math.min(10, this.raw_result.length)); |
|
225 | .attr('size', Math.min(10, this.raw_result.length)); | |
@@ -255,8 +257,6 b' var IPython = (function (IPython) {' | |||||
255 | this.build_gui_list(this.raw_result); |
|
257 | this.build_gui_list(this.raw_result); | |
256 |
|
258 | |||
257 | this.sel.focus(); |
|
259 | this.sel.focus(); | |
258 | // This needs to be after the focus() call because that puts the notebook into |
|
|||
259 | // command mode. |
|
|||
260 | IPython.keyboard_manager.null_mode(); |
|
260 | IPython.keyboard_manager.null_mode(); | |
261 | // Opera sometimes ignores focusing a freshly created node |
|
261 | // Opera sometimes ignores focusing a freshly created node | |
262 | if (window.opera) setTimeout(function () { |
|
262 | if (window.opera) setTimeout(function () { |
General Comments 0
You need to be logged in to leave comments.
Login now