Permalink
Browse files

Add support for mousedown event

Fixed idle event being triggered when user is clicking on the page
  • Loading branch information...
1 parent cd17466 commit 9be56eabbe4a9704556094b1936631a57171a080 @ashwinjk ashwinjk committed Sep 11, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/gallery-idletimer/js/idletimer.js
@@ -128,6 +128,7 @@ Y.IdleTimer = {
//assign appropriate event handlers
Y.on("mousemove", handleUserEvent, doc);
+ Y.on("mousedown", handleUserEvent, doc);
Y.on("keydown", handleUserEvent, doc);
//need to add the old-fashioned way
@@ -158,6 +159,7 @@ Y.IdleTimer = {
//detach the event handlers
Y.detach("mousemove", handleUserEvent, doc);
+ Y.detach("mousedown", handleUserEvent, doc);
Y.detach("keydown", handleUserEvent, doc);
if (doc.removeEventListener) {

0 comments on commit 9be56ea

Please sign in to comment.