gilbarbara / react-joyride

Create guided tours in your apps
https://react-joyride.com/
MIT License
6.8k stars 525 forks source link

When going to next step programmatically, previous tooltips do not close! #909

Closed waqaarali closed 1 year ago

waqaarali commented 1 year ago

🐛 Bug Report

When I go to the next tooltip through a controlled (programmatic) environment, it seems that the tooltips crash. Or the previous tooltip sometimes remains opened, killing all functionality.

To Reproduce

Steps to reproduce the behavior:

https://codesandbox.io/s/stoic-dewdney-44s36w?file=/src/App.js

Expected behavior

The tooltips close in the correct order.

Link to repl or repo (highly encouraged)

https://codesandbox.io/s/stoic-dewdney-44s36w?file=/src/App.js

System:
    OS: Windows 10 10.0.22621
    CPU: (12) x64 AMD Ryzen 5 5600H with Radeon Graphics
    Memory: 2.58 GB / 15.34 GB
  Binaries:
    Node: 18.5.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.12.1 - C:\Program Files\nodejs\npm.CMD
  npmPackages:
    react-joyride: ^2.5.4 => 2.5.4
gilbarbara commented 1 year ago

Hey @waqaarali

I don't see any errors in the codesandbox.

waqaarali commented 1 year ago

I figured it out yesterday, thanks for reminding me to close the comment! :) The fix is available in the Codesandbox, I had missed out the call-back since it specifically mentions it in the README files on Github. A mistake on my side!

Thanks :)