Skip to content

Commit

Permalink
Add support for mousedown event
Browse files Browse the repository at this point in the history
Fixed idle event being triggered when user is clicking on the page
  • Loading branch information
ashwinjk committed Sep 11, 2012
1 parent cd17466 commit 9be56ea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gallery-idletimer/js/idletimer.js
Expand Up @@ -128,6 +128,7 @@ Y.IdleTimer = {


//assign appropriate event handlers //assign appropriate event handlers
Y.on("mousemove", handleUserEvent, doc); Y.on("mousemove", handleUserEvent, doc);
Y.on("mousedown", handleUserEvent, doc);
Y.on("keydown", handleUserEvent, doc); Y.on("keydown", handleUserEvent, doc);


//need to add the old-fashioned way //need to add the old-fashioned way
Expand Down Expand Up @@ -158,6 +159,7 @@ Y.IdleTimer = {


//detach the event handlers //detach the event handlers
Y.detach("mousemove", handleUserEvent, doc); Y.detach("mousemove", handleUserEvent, doc);
Y.detach("mousedown", handleUserEvent, doc);
Y.detach("keydown", handleUserEvent, doc); Y.detach("keydown", handleUserEvent, doc);


if (doc.removeEventListener) { if (doc.removeEventListener) {
Expand Down

0 comments on commit 9be56ea

Please sign in to comment.