Open leobardimpact opened 9 years ago
Thanks for the note @leobardimpact. If you've found a fix, could you please submit a PR?
Hi @carlsednaoui - sorry, I don't have a diff for you. I already coded and deployed my own "exit detection" before I found ouibounce.
It works along the following lines of "keep the last known location while you have it", if you translate it to ouibounce it would be (untested):
// this goes inside the ouibounce defining function // new var var lastMoveMouseClientY = 100; // i.e. sensitivity+1 // the ugly handler needed for IE :-( var onMouseMove = function(e) { lastMoveMouseClientY = e.clientY; } _html.mousemove(onMouseMove);
// replace e.clientY with var, no changes otherwise. function handleMouseleave(e) { if (lastMoveMouseClientY > sensitivity || (checkCookieValue(cookieName, 'true') && !aggressive)) return;
_delayTimer = setTimeout(_fireAndCallback, delay);
}
Hi Carl,
First of all, thanks for your great plugin!
I noticed the plugin does not seem to work in any version of IE. Would it be possible to take a look at the fix of Leo and see if this fixes things?
Best regards,
Pim
Thanks for the note, @pvdbroek. If you'd like to see this implemented, the easiest way is to submit a PR. I can take a look at this in the coming weeks/ month. Just need to get parallel for my computer and be able to run IE to test this.
This is no longer valid in IE11 (Internet Explorer 11): ... function handleMouseleave(e) { if (e.clientY ...
In IE11, e.clientY will always be -1, thus making the whole point here invalid.
I hacked for myself a solution where I register an additional mousemove handler that stores the "last known position" in a private var and compares that instead of e.clientY.
bummer...