braposo / react-text-loop

Animate words in your headings

Home Page:https://codesandbox.io/s/react-text-loop-playground-br4q1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Switching Tab Synchronisation

rehatkathuria opened this issue · comments

First of all, thank you for this wonderful component! Secondly, I've noticed an issue with Safari (Version 14.0 (16610.1.21.1.2)) and Chrome (Version 84.0.4147.135 (Official Build) (64-bit)) using 2.3.0.

I have two separate sections that contain a TextLoop each. One has a delay and the other doesn't. Their transition at first, works fine. However, when one switches to another tab, waits a dozen seconds or so and navigates back, their transitions end up synchronising and happen concurrently.

Steps to reproduce:

  1. Add two TextLoop components to a page.
  2. Set a delay on one of them to offset their transitions to be separated from each other.
  3. Navigate to another tab.
  4. Wait for a dozen seconds or so.
  5. Navigate back

Expected results:
I'm not sure if the intended behaviour is already that the timers should pause when one navigates away from the tab, but perhaps that would be a good solution?

Again, thank you for your work on this component; it's an absolute joy to use.

Hey there @rehatkathuria !
I realised the same problem ,what solution did you find for it?
Please let me know!

PS: this package is awesome btw.