Closed SethRedwine closed 5 years ago
Hi @SethRedwine ,
Thank you for the detailed description. I think I've understood what's your issue here, the problem is that the tour is not able to find the target and then it fails causing the wrong behaviour you're facing, since this is not an expected case by the tour itself.
Workaround: If a target step is hidden by a *ngIf and you want to see it anyway, you can use the next
, prev
events (listen-for-events) to do some actions in order to get the element visible.
I have a question, just to undestand better: if you don't want to see some steps and you already know that these elements are going to be hidden for sure in the DOM, why are you adding them in the step list?
P.S.: I will fix this with your suggestion, to make the tour stronger.
To be fair, I only encountered this issue because of a design flaw on my part. I'm relying on successful data calls to populate some areas of my interface instead of providing mocked data to ensure they'll be there. I think this should probably only be come across if people are doing things a little fast and loose like I am. I just thought it'd (hopefully) be an easy way to make the tour a little more graceful though.
Also, thank you for your lightning quick response!
With the new release (2.2.8) the tour handles all the cases in which a step is missing. It also logs whenever it doesn't find a target, skipping automatically.
Describe the bug
Hi, super module you've got set up here. I encountered a small issue while I was using it though. When the tour encounters a step that's supposed to be on an element that's hidden (ngIf'ed in my case) it seems to skip the step like I'd expect, however it doesn't increment the count that it's using to keep track of the steps. The tour continues on just fine but when I get to the last step in the tour, I encounter a 'Next' button instead of a 'Done' button (I'm assuming because of the count?) and clicking 'Next' covers the page in a scrim with no tour step, necessitating a refresh.
I've done some checking to just call JoyrideService.closeTour() you recently added to the next attribute of my last step, but it seems like something that should also be checked and handled in the framework itself.
To Reproduce Steps to reproduce the behavior:
Expected behavior
A clean exit on the last tour step passed in the startTour() call.
Screenshots
Last step with incorrect step position:
After clicking next without manually calling closeTour():
Details (please complete the following information):