JSFiddle - React, Tailwind, and code Playground

by lchau

HTML

<div>
  <p> <b>Firefox</b>: Fires a <code>mouseover</code> event each time the element
    becomes visible (infinite loop/flickering)</p>
  <p> <b>Chrome/Internet Explorer</b>: Fires the <code>mouseover</code> once until
    the mouse is moved (expected)</p>
</div>
<div class="tester" onmouseover="this.style.display='none';(function(e) {setTimeout(function(){e.style.display=''},250)})(this);">Mouse over this element</div>

CSS

div {
    font: 12px helvetica, arial;
}

div.tester {
    border: 1px solid black;
    color: white;
    background-color: blue;
    margin: 20px 5px;
    padding: 5px;
    display: block;
}