mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 11:52:01 +00:00
jquery.idle.js: fix keepTracking option
(imported from commit 327a1c128a88e2e7fcfe7654c6c2c0c67dac0f27)
This commit is contained in:
@@ -70,8 +70,14 @@
|
|||||||
idle = true;
|
idle = true;
|
||||||
cancel();
|
cancel();
|
||||||
settings.onIdle.call();
|
settings.onIdle.call();
|
||||||
if(settings.keepTracking){
|
if(settings.keepTracking) {
|
||||||
timerId = createTimeout(settings);
|
// We want the reset to occur after this event has been
|
||||||
|
// completely handled
|
||||||
|
setTimeout(function () {
|
||||||
|
elem.on(settings.events, handler);
|
||||||
|
canceled = false;
|
||||||
|
createTimeout(settings);
|
||||||
|
}, 0);
|
||||||
}
|
}
|
||||||
}, settings.idle);
|
}, settings.idle);
|
||||||
control.timerId = timerId;
|
control.timerId = timerId;
|
||||||
|
|||||||
Reference in New Issue
Block a user