Move should cancel blur into codecell

This commit is contained in:
Jonathan Frederic 2014-02-28 15:06:47 -08:00
parent 4fdc99e111
commit 69e760841a
2 changed files with 4 additions and 3 deletions

View File

@ -269,7 +269,7 @@ var IPython = (function (IPython) {
* @return results {bool} Whether or not to ignore the cell's blur event.
**/
Cell.prototype.should_cancel_blur = function () {
return IPython.tooltip && IPython.tooltip.is_visible();
return false;
};
/**

View File

@ -411,9 +411,10 @@ var IPython = (function (IPython) {
**/
CodeCell.prototype.should_cancel_blur = function () {
// Cancel this unfocus event if the base wants to cancel or the cell
// completer is open.
// completer is open or the tooltip is open.
return IPython.Cell.prototype.should_cancel_blur.apply(this) ||
(this.completer && this.completer.is_visible());
(this.completer && this.completer.is_visible()) ||
(IPython.tooltip && IPython.tooltip.is_visible());
};
CodeCell.prototype.select_all = function () {