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

🐞 onPrompt does not fire if the promptBeforeIdle time occurs while the computer is sleeping #388

Open
1 task done
nauticalcoder opened this issue Feb 9, 2024 · 2 comments
Assignees
Labels
bug A verified and reproducible bug. triage Has not been reviewed yet and should not be worked on.

Comments

@nauticalcoder
Copy link

What happened?

I am reporting this as a bug because this is behavior we did not see in the older (non-hook) version of the library. If the computer is sleeping when the promptBeforeIdle time would have triggered onPrompt, when the computer wakes up, it does not display the prompt. Also, once the timeout time elapses after sleep, onIdle is only fired once some action is taken in the browser window. This is also something we didn't see in the older version of the library.

Reproduction Steps

https://stackblitz.com/edit/stackblitz-starters-kyfpdb?file=src%2FApp.tsx
Assumptions:
timeout: 120 seconds
promptBeforeIdle: 15 seconds

1. Start the timer
2. Keep track of the time outside of the computer and put the computer to sleep
3. Wake the computer up after 1 minute 45 seconds
4. `onPrompt` will not fire
5. After the `timeout` elapses, nothing happens until the user clicks in the window.

Relevant log output

No response

Screenshots or Additional Context

No response

Module Version

5.7.2

What browsers are you seeing the problem on? Select all that apply.

Chrome

What devices are you seeing the problem on?

Desktop

Verification

  • I have checked for existing closed issues and discussions.
@nauticalcoder nauticalcoder added bug A verified and reproducible bug. triage Has not been reviewed yet and should not be worked on. labels Feb 9, 2024
@Arif1234
Copy link

@SupremeTechnopriest : Is there any estimate on resolving this sleep idle timer issue ? I am also using this library in my application, and auto logout is not happening properly , when the system goes to sleep mode .

@TomasBurianTheOne
Copy link

Also if your time out is 10 minutes or longer, there is an issue where Chrome puts the tab to sleep, thus having the same effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A verified and reproducible bug. triage Has not been reviewed yet and should not be worked on.
Projects
None yet
Development

No branches or pull requests

4 participants