browser-interaction-time
browser-interaction-time copied to clipboard
Timer stops when there is input on the page
Hello, I have a page using vue and nuxt. I start a timer when it comes to the login page. The cursor works smoothly while navigating the page. But when you click anywhere other than inputs, the timer stops. When you click on any of the inputs, the timer continues to run. How can I solve this problem.
I used this workaround, whenever it becomes inactive, I start the timer again :man_facepalming:
this.browserInteractionTime.addBrowserTabInactiveCallback(() => {
this.browserInteractionTime.startTimer();
});
You can also use the setting stopTimerOnTabchange
to disable that behavior.
What I did to still detect if the tab is visible or not is use the Page Visibility API instead of the window.blur/focus approach that is used here. Works better for my use-case.
Would this solve the issue? https://github.com/atlassian/browser-interaction-time/pull/175
is this still a issue, i tried to reproduce this and i am not getting this issue for me the timer keeps on working even if i click in or out of input elements if this is still a issue can you provide detailed steps to reproduce this @eiscan . i can give a try to fix it :)