Closed psyafter closed 10 years ago
Had the same issue myself, a better fix will be to change handleUserEvent method (since triggering 'keydown' might not work if not listening to keydown)
handleUserEvent = function(event){
var obj = $.data(this,'idleTimerObj');
if (event.type !== 'mousemove' ||
event.pageX != obj.pageX ||
event.pageY != obj.pageY) {
obj.pageX = event.pageX;
obj.pageY = event.pageY;
//clear any existing timeout
clearTimeout(obj.tId);
//if the idle timer is enabled
if (obj.enabled) {
//if it's idle, that means the user is no longer idle
if (obj.idle){
toggleIdleState(this);
}
//set a new timeout
obj.tId = setTimeout(toggleIdleState, obj.timeout);
}
}
};
@kaellis im not maintaining this library anymore but happy to add you as an admin to land your change
@kaellis, I'm maintaining this project now. If you'd to submit a pull request, I'd gladly review it :-)
Is there anyone still maintaining this plugin?
I believe my branch implements this correctly. https://github.com/thorst/jquery-idletimer/blob/master/src/idle-timer.js
@thorst I'll review today. Thanks for the patch!
I was also hitting a mousemove bug in ios7. That fix along with this one are in 1.0.0
Event mousemove triggered always on plugin change state if using modal window (jquery for example, with overlay) for displaying some popup on idle state. So if mouse is in document area (even if no mouse moving) so idle state finished without any activity.
I have a patch for this situation:
1) should remove event 'mousemove' in 'events' variable
2) after row //assign appropriate event handlers $(elem).bind($.trim((events + ' ').split(' ').join('.idleTimer ')), handleUserEvent);
we put this code: