Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timer with onremind but no onIdle will get garbage collected? #25

Open
sookyee opened this issue Aug 15, 2021 · 1 comment
Open

Timer with onremind but no onIdle will get garbage collected? #25

sookyee opened this issue Aug 15, 2021 · 1 comment

Comments

@sookyee
Copy link

sookyee commented Aug 15, 2021

Not sure if its a bug, but I used two v-idle timers, one is a global timer where it is set on a continuous loop, and when onRemind of this timer is called, will open a popup that shows another v-idle timer. The onIdle function of this popup timer will do the actual logging out of the user, so I didn't need an onIdle function for the first timer.

However, if the page is not in focus for a while, the first timer will stop counting down, hence the onremind will never be called and the popup won't show. I spent a lot of time debugging this, and eventually managed to get the first timer to always countdown by specifying onIdle on the first timer as well.

Of course, I could use only one timer, and when onRemind is called, write some javascript to move the global timer to the popup, but I figured it'll be easier to specify timers in two different places in html instead.

Just a suggestion to perhaps make onIdle not compulsory for all v-idle timers ?
Thanks.

@malekim
Copy link
Owner

malekim commented Feb 23, 2024

@sookyee
just found some time to fix all issues, can you check if it's still an issue? I tried to reproduce it, but I couldn't

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants