Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mousemove event keeps firing in chrome even if the mouse is still #13

Closed
g4g4r1n opened this issue Jan 12, 2015 · 7 comments
Closed

mousemove event keeps firing in chrome even if the mouse is still #13

g4g4r1n opened this issue Jan 12, 2015 · 7 comments
Assignees

Comments

@g4g4r1n
Copy link

g4g4r1n commented Jan 12, 2015

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

@g4g4r1n
Copy link
Author

g4g4r1n commented Jan 13, 2015

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();
    }
  });
};

@JillElaine JillElaine self-assigned this Jan 13, 2015
@JillElaine JillElaine added the bug label Jan 13, 2015
@JillElaine
Copy link
Owner

Thank you for this. What OS and what version of Chrome?

@g4g4r1n
Copy link
Author

g4g4r1n commented Jan 13, 2015

Chrome 39.0.2171.95 m
windows 7

@JillElaine
Copy link
Owner

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.

@JillElaine
Copy link
Owner

Note added to README. Issue complete.

@JillElaine
Copy link
Owner

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
#13 (comment).

@g4g4r1n
Copy link
Author

g4g4r1n commented Jan 28, 2015

you are most welcome. I am very happy with the plugin, It is exactly what we were looking for the project. thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants