##// END OF EJS Templates
fix tooltip keep focus on wrong cell...
Matthias BUSSONNIER -
Show More
@@ -160,6 +160,7 b' var IPython = (function (IPython) {'
160 // keep scroll top to be sure to always see the first line
160 // keep scroll top to be sure to always see the first line
161 this.text.scrollTop(0);
161 this.text.scrollTop(0);
162 this._hidden = true;
162 this._hidden = true;
163 this.code_mirror = null;
163 }
164 }
164
165
165 Tooltip.prototype.remove_and_cancel_tooltip = function (force) {
166 Tooltip.prototype.remove_and_cancel_tooltip = function (force) {
@@ -229,7 +230,7 b' var IPython = (function (IPython) {'
229 ch: 0
230 ch: 0
230 }, cursor).trim();
231 }, cursor).trim();
231
232
232 // need a permanent handel to codemirror for future auto recall
233 // need a permanent handel to code_mirror for future auto recall
233 this.code_mirror = editor;
234 this.code_mirror = editor;
234
235
235 // now we treat the different number of keypress
236 // now we treat the different number of keypress
@@ -346,12 +347,15 b' var IPython = (function (IPython) {'
346 this.text.scrollTop(0);
347 this.text.scrollTop(0);
347 }
348 }
348
349
349 // convenient funciton to have the correct codemirror back into focus
350 // convenient funciton to have the correct code_mirror back into focus
350 Tooltip.prototype._cmfocus = function () {
351 Tooltip.prototype._cmfocus = function () {
351 var cm = this.code_mirror;
352 var cm = this.code_mirror;
352 setTimeout(function () {
353 if (cm == IPython.notebook.get_selected_cell())
353 cm.focus();
354 {
354 }, 50);
355 setTimeout(function () {
356 cm.focus();
357 }, 50);
358 }
355 }
359 }
356
360
357 IPython.Tooltip = Tooltip;
361 IPython.Tooltip = Tooltip;
General Comments 0
You need to be logged in to leave comments. Login now