diff --git a/IPython/frontend/html/notebook/static/css/tooltip.css b/IPython/frontend/html/notebook/static/css/tooltip.css index 3722179..3c65498 100644 --- a/IPython/frontend/html/notebook/static/css/tooltip.css +++ b/IPython/frontend/html/notebook/static/css/tooltip.css @@ -9,8 +9,8 @@ **/ /* * We'll try to get something pretty, so we - * have some strange ccs to have the scroll bar on - * the left of the left with fix button on the top right of the tooltip + * have some strange css to have the scroll bar on + * the left with fix button on the top right of the tooltip */ @-moz-keyframes fadeOut { from { @@ -131,9 +131,3 @@ -ms-transform: rotate(45deg); -o-transform: rotate(45deg); } -.tooltip.hide { - -webkit-animation: fadeOut 800ms; - -moz-animation: fadeOut 800ms; - animation: fadeOut 800ms; - opacity: 0; -} diff --git a/IPython/frontend/html/notebook/static/js/tooltip.js b/IPython/frontend/html/notebook/static/js/tooltip.js index 8503423..02289bf 100644 --- a/IPython/frontend/html/notebook/static/js/tooltip.js +++ b/IPython/frontend/html/notebook/static/js/tooltip.js @@ -152,8 +152,8 @@ var IPython = (function (IPython) { // deal with all the logic of hiding the tooltip // and reset it's status - Tooltip.prototype.hide = function () { - this.tooltip.addClass('hide'); + Tooltip.prototype._hide = function () { + this.tooltip.fadeOut('fast'); $('#expanbutton').show('slow'); this.text.removeClass('bigtooltip'); this.text.addClass('smalltooltip'); @@ -167,10 +167,11 @@ var IPython = (function (IPython) { // as in the completer, because it is not focusable, so won't // get the event. if (this._sticky == false || force == true) { - this.hide(); + this._hide(); } this.cancel_pending(); - this.reset_tabs_function (); + this.reset_tabs_function(); + this._cmfocus(); } // cancel autocall done after '(' for example. @@ -210,7 +211,7 @@ var IPython = (function (IPython) { var re = /[a-z_][0-9a-z._]+$/gi; // casse insensitive var callbacks = { - 'object_info_reply': $.proxy(this.show, this) + 'object_info_reply': $.proxy(this._show, this) } var msg_id = IPython.notebook.kernel.object_info_request(re.exec(func), callbacks); } @@ -278,7 +279,7 @@ var IPython = (function (IPython) { } // should be called with the kernel reply to actually show the tooltip - Tooltip.prototype.show = function (reply) { + Tooltip.prototype._show = function (reply) { // move the bubble if it is not hidden // otherwise fade it this.name = reply.name; @@ -310,8 +311,7 @@ var IPython = (function (IPython) { this.arrow.animate({ 'left': posarrowleft + 'px' }); - this.tooltip.removeClass('hidden') - this.tooltip.removeClass('hide'); + this.tooltip.fadeIn('fast'); this._hidden = false; // build docstring diff --git a/IPython/frontend/html/notebook/static/less/tooltip.less b/IPython/frontend/html/notebook/static/less/tooltip.less index e9b28a5..5a70351 100644 --- a/IPython/frontend/html/notebook/static/less/tooltip.less +++ b/IPython/frontend/html/notebook/static/less/tooltip.less @@ -12,7 +12,7 @@ /* * We'll try to get something pretty, so we * have some strange css to have the scroll bar on - * the left of the left with fix button on the top right of the tooltip + * the left with fix button on the top right of the tooltip */ // double slash comment are remove by less compilation @@ -157,11 +157,3 @@ -ms-transform: rotate(@theta); -o-transform: rotate(@theta); } - -.tooltip.hide -{ - -webkit-animation: fadeOut 800ms; - -moz-animation: fadeOut 800ms; - animation: fadeOut 800ms; - opacity : 0; -} diff --git a/IPython/frontend/html/notebook/templates/notebook.html b/IPython/frontend/html/notebook/templates/notebook.html index ce42f29..64da27c 100644 --- a/IPython/frontend/html/notebook/templates/notebook.html +++ b/IPython/frontend/html/notebook/templates/notebook.html @@ -194,7 +194,7 @@ data-notebook-id={{notebook_id}} -
+ {% end %}