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

Hide events being triggered twice when there is another step #167

Closed
pedroceles opened this issue Jul 7, 2017 · 0 comments
Closed

Hide events being triggered twice when there is another step #167

pedroceles opened this issue Jul 7, 2017 · 0 comments
Labels

Comments

@pedroceles
Copy link

sample code

    let tour = new Shepherd.Tour({
        classes: 'shepherd-theme-arrows',
        scrollTo: true
    })
    tour.addStep({
        text: "step1",
        attachTo: "#elementId",
        when: {
            'before-hide': () => {console.log('before-hide1')}
        }
    })
    tour.addStep({
        text: "step2",
        attachTo: "#elementId",
        when: {
            'before-hide': () => {console.log('before-hide2')}
        }
    })

'before-hide1' will be logged twice. That is because the show method for the Tour class calls this.currentStep.hide() twice when there is a next step (on lines 617 and 644).

rodu added a commit to rodu/shepherd that referenced this issue Jul 13, 2017
From doing some debugging, it appears that an unecessary
additional call was made to the hide method.

Fixes issue shipshapecode#167
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

2 participants