Skip to content

Conversation

@richtmat
Copy link

@richtmat richtmat commented Nov 5, 2015

Honestly I have no idea if this PR is ok as the tests do not run at the moment. So please have a look...

Background:

I'm building an angular SPA with bootstrap-tour and overwrote the redirect method to use angulars $locate. (A regular redirect destroys the tour in an SPA immediatly.) Then, when bootstrap-tour tries to find the element of the next step, the redirect is not finished and the tour is destroyed.

To overcome this issue I use the onShow method as it blocks until a promise is resolved. So I choose the next steps element and wait for it and resolve the promise. That is exactly when I need tour.getCurrentStep().

It shows that on the first and second step tour.getCurrentStep() returns 0. So this PR resolves this issue but may cause troubles for devs using the onShow and getCurrentStep with off-by-one errors.

@sorich87
Copy link
Owner

sorich87 commented Dec 7, 2015

@Ousram please can you verify this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants