On the site there is a popup that in the case should only appear when the person takes the mouse from the area of the site. But it was showing up by clicking on a button that
jQuery('body').mouseleave(function() {
if (!jQuery('body').hasClass('leave-on') && localStorage.getItem("leave") != "closed") {
jQuery('body').addClass('leave-on');
}
});
So here in stackoverflow itself they helped me resolve In this topic
But then I came across a new problem that still occurs with the same images or svg buttons. But now it only happens in Firefox, and by hovering over such SVG the mouseleave is already fired, but in Chrome not.
Sample code for an SVG problem:
<svg class="icon-blog"> <use xlink:href="#blog"></use> </svg>
In the java script there is also this, I do not know if it might be causing the problem too:
var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
// IE does not have innerHTML for SVG nodes, so instead we inject the
// new markup in a temp node and then move the child nodes across into
// the target node
if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {
reusableSVGContainer = reusableSVGContainer ||
document.createElement('div');
reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';
var svgNode = reusableSVGContainer.firstChild;
while (svgNode.firstChild) {
node.appendChild(svgNode.firstChild);
}
} else {
node.innerHTML = html;
}
});