Closed g4g4r1n closed 9 years ago
possible solution for the chrome bug:
var mouseX, mouseY;
activityDetector = function () {
$('body').on(opts.activityEvents, function (e) {
if(e.type == 'mousemove') {
if(e.clientX == mouseX && e.clientY == mouseY){
//mouse has not really moved, chrome mousemove bug
return;
}
mouseX = e.clientX;
mouseY = e.clientY;
}
if (!opts.enableDialog || (opts.enableDialog && isDialogOpen() !== true)) {
startIdleTimer();
}
});
};
Thank you for this. What OS and what version of Chrome?
Chrome 39.0.2171.95 m windows 7
I do not experience the mousemove bug in the same version of Chrome on Linux. I see other references to this Chrome bug on Windows 7 & XP, but not with Chrome and Mac OS. I appreciate your provided possible solution, but I'm hesitant to add overhead and complexity to the code.
I hope that Google and Windows will fix this bug. If it occurs in all combinations of Chrome + Windows, it's a BIG bug! It would create havoc with any idletimers that register the mousemove event as activity, and perhaps explains why the mousemove event is not often included as 'activity' on banking sites, etc.
At this point, I'll add a note about the bug to the README (soon) and include your possible solution. Thank you for reporting this.
Note added to README. Issue complete.
g4g4r1n, just wanted to thank you for your report on the apparent mousemove bug in Chrome. I've now added your report and possible solution to the README for the plugin.
Jill Elaine On 01/13/2015 10:03 AM, g4g4r1n wrote:
Chrome 39.0.2171.95 m windows 7
— Reply to this email directly or view it on GitHub https://github.com/JillElaine/jquery-idleTimeout/issues/13#issuecomment-69789301.
you are most welcome. I am very happy with the plugin, It is exactly what we were looking for the project. thank you!
This is chrome specific issue, I think. As long as the page is in focus (active window), the mousemove event fires continuously resetting the idle timer.
I am using Chrome 39.0.2171.95 m, but I suspect it is not limited to this version
perhaps it maybe necessary to keep track of mouse position to reliably confirm mousemove events along the lines of http://stackoverflow.com/a/15086713