Closed thomasgrivet closed 3 years ago
@thomasgrivet Hi, thanks a lot for the feedback :) Regarding the issue, I've tried a very simple example using setInterval
, triggering slideToNextItem
every 1000ms (I've also tried different cases) but I couldn't reproduce it; could you please share to me a code snippet or something?
In any case, I was thinking to monitor the visibilityChange
event and disable the carousel animation if the document is hidden to prevent strange behaviors when using setInterval
. Let me know :)
Hello! Thanks for the answer! I ended up checking for document.hidden before triggering slideToNextItem as a quick fix 🙂 I will try to post a codesandbox example tomorrow!
Thanks! I would like to investigate a bit to see if there's some dirty bug somewhere.
@thomasgrivet I've spotted a possible case that was causing your bug; if you can, please try to update to the latest version - 1.7.5
- and see if the issue is still reproducible.
@thomasgrivet I've spotted a possible case that was causing your bug; if you can, please try to update to the latest version -
1.7.5
- and see if the issue is still reproducible.
I don't have / could not reproduce the issue anymore, thanks for the quick update! Really appreciate it!
Have a nice week!
Hello!
First of all, thanks a lot for this awesome project! I used to work with other carousel components like react-slick and such but this one it simply the best anyone can use IMO. I just have a single problem with the function 'slideToNextItem' that I use in a simple useEffect to automatically slide to the next item every X seconds. It works fine when the tab is opened and focused, but as soon as I change tab and comes back I have the following error:
Do you have any idea what could cause this? As far as I understand, the issue comes from the
getWrapperFromValue
function.Thanks a lot!