I am trying to fix a bug with the mouseenter and mouseleave handler.
listener.addEventListener('mouseenter', function(){
element.style.visibility = "visible";
}, true);
listener.addEventListener('mouseleave', function(){
element.style.visibility = "hidden";
}, true);
The events work as expected except for when i am moving the mouse over the element it flashes the mouse leave event.
Any fixes for this?
Plain javascript solutions only, please (no 3rd party libraries).