Seems like the onPrompt function doesn't fire until the tab is active again #404
Unanswered
chris-hinds-paytently
asked this question in
Q&A
Replies: 1 comment
-
https://idletimer.dev/docs/api/props#timers You need to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've wrapped this in a custom hook which is then called on my main layout. Everything seems to be working except when the tab is not focussed.
I have a modal which the onPrompt callback triggers, this modal has a countdown time and will auto log the user out if they havent interacted with it. The modal will open after 14 minutes in inactivity.
The problem is the modal doesnt open until the tab is refocussed, so a user could have been inactive for 1 hour and the modal only shows, thus the logout time only stars when the tab has focus, so it seems like onPrompt isnt being called when the tab is not focussed..
This is the custom hook.
Beta Was this translation helpful? Give feedback.
All reactions