Closed JordanDC2 closed 1 year ago
@gilbarbara can you provide any solution for this, I encountered the same issue today.
same issue for me, breaking the tour when I am coming back to step 1. Also noticed that it is depended on other things, if you do not use custom callback it works fine, and if target is not set to some wrappers around elements.
Fixed in 2.5.2
Hi, I'm still having an issue with this on 2.5.2.
I have a tour where the first step has placement: center
and target: body
. If I go to the next step, which is a regular targeted tour step that highlights an element, then go back to the first step, I can no longer go forward again.
I don't have this issue in tours where all the steps are targeted, only when returning to the first step which has placement: center
.
Thanks :)
Hey @xNiallC
The Basic example in the demo has this exact setup. Does it work for you? Check the source code for more details.
Otherwise, please provide a minimal reproducible codesandbox.
🐛 Bug Report
If in controlled tour mode with a
placement: "center"
step prop, when clicking the back button to go back to the first step the tour will not fire theaction: "prev"
type: "step:before"
callback event, nor the subsequent tooltip update event, thus causing the tour to break.This issue appears to happen on the first step of the tour. Subsequent steps with
placement: "center"
appear to be unaffected.To Reproduce
placement: "center"
Expected behavior
The events should fire allowing the tour to continue.
Link to repl or repo (highly encouraged)
https://codesandbox.io/s/react-joyride-center-placement-first-step-frcz13
Run
npx envinfo --system --binaries --npmPackages react-joyride
Paste the results here:
System: OS: macOS 12.5 CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz Memory: 3.80 GB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 7.24.1 - ~/react-storybook/node_modules/.bin/npm npmPackages: react-joyride: ^2.4.0 => 2.4.0