Code Monkey home page Code Monkey logo

Comments (2)

gkoo avatar gkoo commented on June 21, 2024

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.

from hopscotch.

diondkb avatar diondkb commented on June 21, 2024

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

from hopscotch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.