When I make a new element using Raphael.js, if this element arrives under an idle cursor, hover events do not trigger for chrome(42.0.2311.90) or internet explorer(11.0.8). Firefox(31.0, 32.0.2, and 37.0.2) works as expected.
I'm trying to find if there is a way to manually trigger tests that check if the cursor is over an element(when there is no new mouseevent after element is created) so I can compensate for this.
I think I need to get Raphael to do the test because shapes are often rotated and not square.
Other workarounds are welcome.
Code:
<!DOCTYPE html>
<html>
<head>
<style>
.board{
height: 600px;
width: 800px;
border: 1px black solid;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.2/raphael-min.js"></script>
<script> g = typeof g !== "undefined" ? g : {}; </script>
</head>
<body>
<div id="board" class="board"></div>
<script>
g.board = Raphael("board",800,600);
var circle = g.board.circle(50, 40, 10);
circle.attr({"fill": "blue"});
circle.hover(function() {
this.attr({"fill": "yellow"});
this.animate({"r": 30},1000);
var circle = g.board.circle(50, 40, 10);
circle.attr({"fill": "purple"});
circle.hover(function() {
this.attr({"fill": "green"});
this.animate({"r": 25},1000);
}, function() {
circle.remove();
});
}, function() {
});
</script>
</body>
</html>