moribvndvs / ng2-idle

Responding to idle users in Angular (not AngularJS) applications.
https://moribvndvs.github.io/ng2-idle
Apache License 2.0
315 stars 128 forks source link

Idle detection is not consistent in Chrome and firefox #107

Open ZahraFatima opened 5 years ago

ZahraFatima commented 5 years ago

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/HackedByChinese/ng2-idle/blob/master/CONTRIBUTING.md#getting-help

Current behavior Sometimes it happens that I am working on my screen and performing some actions and idle detection occurs

-It should not detects idle until its actually idle.

Minimal reproduction of the problem with instructions

I am setting idle timeout of 15 minutes and sometimes it happens that we are performing actions on my screen and it detects idle timeout and onIdleStart() function executes.

What is the motivation / use case for changing the behavior?

Please tell us about your environment: Windows, VS Code,Angular CLI, HTTP Client

dmbaker90 commented 3 years ago

Did you figure anything out here. I'm trying to find out why idle detection runs while users are performing actions on the screen.

komalpopli commented 1 year ago

a similar issue is happening with me when idle.onTimeout is not firing when the app is running in the background for chrome and edge but is working fine for firefox. I am sure it is because of background task suspension in chrome and edge but the library should have a solution.

strigefleur commented 7 months ago

It should make use of workers-timers to rely on instead of default timeout functions. Default timeout functions easily suspend on browser inactive tabs throttling.