Replies: 2 comments 1 reply
-
I have resorted to working around this issue by setting my |
Beta Was this translation helpful? Give feedback.
-
I now think my issue was using |
Beta Was this translation helpful? Give feedback.
-
Hello. I've tried debugging this locally, and haven't figured out what's going on. Before trying to post any code (which is pretty complex, and inolves an external session API), I just want to make sure I'm understanding things.
I now have listeners set up on every event/state-change method of the timer (I'm using the hook), and as in the demos, I'm currently logging out remaining time in the UI so I can see what's happening. I also have both
startOnMount
andstartManually
set tofalse
, and control the timer by starting it only when a user has an authenticated session and updating it by setting values fortimeout
andpromptBeforeIde
in the wrapping component'sstate
.Sometimes when I move my mouse or similar, or when I tab away for a bit and come back, I see
onAction
being called with the relevant event (likemousemove
orvisibilitychange
) . This is expected. In these cases, I declaratively update my time values, and then expect my timer to restart and forgetRemainingTime
to be updated, with more time remaining.But there are also times when moving my mouse or tabbing does not trigger any callback, and still
getRemainingTime
is updated. Here I mean I have callbacks foronIdle
,onPrompt
,onAction
,onActive
(which still confuses me, vsonAction
),onMessage
, andonPresenceChange
.Why would
getRemainingTime
be updated with more time on something like amousemove
if none of the timer's event or state-change callbacks have been called?Thanks
Beta Was this translation helpful? Give feedback.
All reactions