You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I opened another tab while the first tab is in "prompted" state and the prompt is showing the "promptBeforeIdle"(1 minute) time in a countdown manner. The second tab is in "active" state now, but the prompt in first tab showing the idle timeout (2 minutes) in countdown rather than the "promptBeforeIdle" time now.
I have implemented these, inspired from the "confirm prompt" in the idle-Timer documentation. This prompt syncs fine when we are opening the new tab when the other tab is in active state.
1.open the App and waitfor"confirm prompt"
2.After seeing the prompt, load the App in another tab
3.second tab is active now, return to the first tab where we can see the timer is being showing the "timeout" time.
...
Relevant log output
No response
Screenshots or Additional Context
No response
Module Version
5.6.0
What browsers are you seeing the problem on? Select all that apply.
No response
What devices are you seeing the problem on?
No response
Verification
I have checked for existing closed issues and discussions.
The text was updated successfully, but these errors were encountered:
What happened?
I opened another tab while the first tab is in "prompted" state and the prompt is showing the "promptBeforeIdle"(1 minute) time in a countdown manner. The second tab is in "active" state now, but the prompt in first tab showing the idle timeout (2 minutes) in countdown rather than the "promptBeforeIdle" time now.
I have implemented these, inspired from the "confirm prompt" in the idle-Timer documentation. This prompt syncs fine when we are opening the new tab when the other tab is in active state.
function SessionTimeout() {
const timeout = 1000 * 60 * 2;
const promptBeforeIdle = 1000 * 60 * 1;
const [remaining, setRemaining] = useState(timeout);
const [isOpen, setOpen] = useState(false);
const onIdle = () => {
setOpen(true);
};
const onPrompt = () => {
setOpen(true);
};
const { getRemainingTime, isPrompted, activate } = useIdleTimer({
onIdle,
stopOnIdle: true,
onPrompt,
syncTimers: 10,
timeout,
crossTab: true,
promptBeforeIdle,
throttle: 500
});
useEffect(() => {
const interval = setInterval(() => {
{
setRemaining(Math.ceil(getRemainingTime() / 1000));
}
}, 1000);
return () => {
clearInterval(interval);
};
});
return (
<>
<SessionTimeoutDialog
isOpen={isOpen}
activate={() => {
activate();
setOpen(false);
}}
remaining={remaining}
/>
</>
);
}
Reproduction Steps
Relevant log output
No response
Screenshots or Additional Context
No response
Module Version
5.6.0
What browsers are you seeing the problem on? Select all that apply.
No response
What devices are you seeing the problem on?
No response
Verification
The text was updated successfully, but these errors were encountered: