Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Tour stays on same step if using multipage and subsequent step doesn't exist #3

Closed
yeah opened this issue Jun 18, 2013 · 2 comments
Closed

Comments

@yeah
Copy link
Contributor

yeah commented Jun 18, 2013

When using a multipage setup, hopscotch works great in case the subsequent step is on the next page. However, it breaks if the subsequent step's target doesn't exist on the next page. I would assume hopscotch would then just "skip" to the next subsequent step, but it doesn't. Instead, it will repeat the last step after the multipage jump.

@gkoo
Copy link
Contributor

gkoo commented Jun 18, 2013

Hey Jan, thanks for bringing this up. This is a tricky case where a few different cases can have the same saved state, and Hopscotch just does the best that it can.

Consider a tour where step 1 is on page A, and step 2 and step 3 are on page B. If the user is on step 1 on page A and refreshes the page, step 1 should display again once the page has reloaded. To Hopscotch, refreshing the page is the same as loading another page, since it is going to check state (sessionStorage/cookies) to figure out what it should do. Since it's ambiguous what state the tour is in, Hopscotch will try to find elements in this order: step 2, step 1, step 3, step 4, ... and so on until the end of the tour. Checking step 1 is meant to handle the refresh case.

Of course, that means that in situations like yours where the DOM element for step 1 exists on both page A and B, and the element for step 2 does not exist on page B, it's going to get it wrong. At this time, it's just an edge case that the framework currently doesn't handle. Sorry! If you can change your tour to include the step 2 element on page B for sure, or to exclude the step 1 element on page B, that would be the best way to handle it.

@gkoo gkoo closed this as completed Jun 18, 2013
@diondkb
Copy link

diondkb commented Jun 20, 2015

I have a similar problem when using hopscotch over multiple pages under Wordpress. Cant get passed the first step

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants