Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step divs remain after tour has ended #66

Closed
mechkg opened this issue Jun 2, 2015 · 3 comments
Closed

Step divs remain after tour has ended #66

mechkg opened this issue Jun 2, 2015 · 3 comments
Labels

Comments

@mechkg
Copy link

mechkg commented Jun 2, 2015

I am trying to use Shepherd in a single-page app, and I just noticed that divs that Shepherd creates to display step content remain in the document when the tour ends. If the page is not refreshed and multiple tours are started the number of those divs grows indefinitely.

Is there any way to clean them up? I mean I can always just remove '.shepherd-step' divs, but why are they kept around?

@geekjuice
Copy link
Contributor

Hmm, this seems like a bug. I would at least expect subsequent tours to reuse the existing DOM elements from the previous tour, but it seems to just recreate them. I'll take a look into this and hopefully have it fixed for the next release. Thanks for the catch!

@geekjuice geekjuice added the bug label Jun 22, 2015
@awwester
Copy link

It is the same thing for the style="pointer-events: none;" which gets applied to the target element. If you exit the tour on a button or some other element that has a click action attached to it the element stays inactive.

@Steve-Mc
Copy link

Steve-Mc commented May 18, 2016

Quick fix:

Shepherd.activeTour.steps.map(step => step.destroy());

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

No branches or pull requests

4 participants