Skip to content

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

@nauticalcoder

Description

@nauticalcoder

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.

Metadata

Metadata

Labels

bugA verified and reproducible bug.triageHas not been reviewed yet and should not be worked on.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions