browser-interaction-time icon indicating copy to clipboard operation
browser-interaction-time copied to clipboard

Timer stops when there is input on the page

Open eiscan opened this issue 4 years ago • 4 comments

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.

eiscan avatar Oct 09 '20 14:10 eiscan

I used this workaround, whenever it becomes inactive, I start the timer again :man_facepalming:

this.browserInteractionTime.addBrowserTabInactiveCallback(() => {
   this.browserInteractionTime.startTimer();
});

omarsupermood avatar Feb 15 '21 15:02 omarsupermood

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.

Trunksome avatar Jun 11 '21 14:06 Trunksome

Would this solve the issue? https://github.com/atlassian/browser-interaction-time/pull/175

meandmax avatar Nov 11 '21 14:11 meandmax

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 :)

nabhiraj avatar Apr 07 '24 08:04 nabhiraj