If you put a mouseleave listener on a div at the very top of the page, it will not fire on Chrome if you move the mouse slowly out of the top of the page (but it does work if you do it quickly). It's the same if you listen for the event on the document or body. Works fine in Firefox.
You can see the problem in this codepen. Uncomment the CSS padding to see my current workaround.
Any thoughts on why this is the case? Possibly a Webkit bug? Any other workarounds?
Update: this not related to jQuery - I reproduced the problem using the native mouseleave JavaScript event in Chrome.
Update: filed a Chromium issue: mouseleave not fired when move mouse slowly
The codepen page in full mode works fine for me, counter increases also with slow movements. I tested it on Windows 7 with Chrome 31.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With