1
1
Fork 0

Fix hovercard vanish

This commit is contained in:
Philipp Holzer 2019-05-26 21:42:49 +02:00
commit 78a20e5acb
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
7 changed files with 122 additions and 9 deletions

View file

@ -55,7 +55,7 @@ $(document).ready(function(){
var hctrigger = 'manual';
};
// Timeoute until the hover-card does appear
// Timeout until the hover-card does appear
setTimeout(function(){
if(targetElement.is(":hover") && parseInt(targetElement.attr('data-awaiting-hover-card'),10) == timeNow) {
if($('.hovercard').length == 0) { // no card if there already is one open
@ -81,6 +81,9 @@ $(document).ready(function(){
template: '<div class="popover hovercard" data-card-created="' + timeNow + '"><div class="arrow"></div><div class="popover-content hovercard-content"></div></div>',
content: data,
container: "body",
sanitizeFn: function (content) {
return DOMPurify.sanitize(content)
},
}).popover('show');
}
});