Skip to content

Commit

Permalink
fixes matomo-org#4099 fix tooltip is not displayed after clicking a l…
Browse files Browse the repository at this point in the history
…ink and going back to the visitor link. Seems to be a bug in jQueryUI but could workaround it. Unfortunately, I did not find the actual issue in jquery and also did not find a ticket for that
  • Loading branch information
tsteur committed Nov 24, 2013
1 parent cf34713 commit e0cef4d
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions plugins/Live/javascripts/visitorLog.js
Expand Up @@ -51,16 +51,28 @@
prevhtml = current;
prevelement = $(this);
}

$(this).tooltip({

var $this = $(this);
var tooltipIsOpened = false;

$('a', $this).on('focus', function () {
// see http://dev.piwik.org/trac/ticket/4099
if (tooltipIsOpened) {
$this.tooltip('close');
}
});

$this.tooltip({
track: true,
show: false,
hide: false,
content: function() {
var title = $(this).attr('title');
return $('<a>').text( title ).html().replace(/\n/g, '<br />');
},
tooltipClass: 'small'
tooltipClass: 'small',
open: function() { tooltipIsOpened = true; },
close: function() { tooltipIsOpened = false; }
});
});
});
Expand Down

0 comments on commit e0cef4d

Please sign in to comment.