mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
fix double tooltip
there was a possibility of 2 tooltip if clicking in two cell and one that it wasn't able to dismiss
This commit is contained in:
parent
1b68c17acc
commit
90b6f1b8d6
@ -73,8 +73,8 @@ var IPython = (function (IPython) {
|
||||
var that = this;
|
||||
// whatever key is pressed, first, cancel the tooltip request before
|
||||
// they are sent, and remove tooltip if any
|
||||
if(event.type === 'keydown' && this.tooltip_timeout != null){
|
||||
CodeCell.prototype.remove_and_cancell_tooltip(that.tooltip_timeout);
|
||||
if(event.type === 'keydown' ){
|
||||
CodeCell.prototype.remove_and_cancel_tooltip(that.tooltip_timeout);
|
||||
that.tooltip_timeout=null;
|
||||
}
|
||||
|
||||
@ -145,12 +145,13 @@ var IPython = (function (IPython) {
|
||||
return false;
|
||||
};
|
||||
|
||||
CodeCell.prototype.remove_and_cancell_tooltip = function(timeout)
|
||||
CodeCell.prototype.remove_and_cancel_tooltip = function(timeout)
|
||||
{
|
||||
// note that we don't handle closing directly inside the calltip
|
||||
// as in the completer, because it is not focusable, so won't
|
||||
// get the event.
|
||||
clearTimeout(timeout);
|
||||
if(timeout != null)
|
||||
{ clearTimeout(timeout);}
|
||||
$('#tooltip').remove();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user