Hi Mason,
I cannot reproduce this with a simple example that could help you (if
it actually showed the problem) without investing unknown amounts of
time and energy - we program everything in ClojureScript and
extracting/ translating the relevant parts would be considerable
effort.
I have tried this:
HTML:
<div onmouseover="addClass('index', 'red')"
onmouseout="removeClass('index', 'red')" id="index">
This is a test.
</div>
CSS:
.red { color: red; };
JS:
function addClass(id, className){
document.getElementById(id).classList.add(className);
console.log("Adding class" + className);
}
function removeClass(id, className){
document.getElementById(id).classList.remove(className);
console.log("Removing class" + className);
}
And the behaviour was ok as I would expect considering this is probably
quite common. In our system the class name is generated, the contained
CSS transforms as well (I though changing the color should be easier).
All is connected over ReactJS which of course could be handling Chrome
and e.g. Firefox differently.
We resorted to handling mouse completely in our app based on positions.
We then fire events based on calculations of the position and sizes of
elements, their z-height etc. This works for us since we have to do
this in other parts of our application anyway.
Thank you for your time.
Adam