Comments (5)
I'm having a similar issue. When I'm calling showStep(x);
while in a onPrev
callback, I don't get redirected to where I should. Apparently, after debugging it a bit, it seems that at first the proper bubble is created, but then, after my onPrev
callback method is executed, it continues with the original onPrev/onBack
behaviour, thus redirecting me again to the previous step.
from hopscotch.
Try returning false
in your callback to denote that the tour should not try to proceed to the next (or previous) step. Let me know if that works for you.
from hopscotch.
I've tried returning false
, but in that case it exits the tour completely (as defined in: https://github.com/linkedin/hopscotch/blob/master/js/hopscotch-0.1.2.js#L1648 ). Maybe this behaviour should be changed to stop the default behaviour when returning false
?
I've changed the mentioned line (L1648) to return this;
and now I'm getting the needed behaviour if I'm using something like:
onPrev: function(){
hopscotch.showStep(5);
return false;
}
from hopscotch.
Good catch, thanks for bringing this to my attention. This commit (35a2b2d) should fix it for you. Feel free to reopen this issue if you still have problems. 🍻
from hopscotch.
Works great. Thank you!
from hopscotch.
Related Issues (20)
- SVGs for sprites?
- Using functions or helpers for target prop
- How to use this library using TypeScript in ng4? HOT 1
- How would I implement a way to cancel the tour if the user navigates away?
- Current step
- FeatureRequest: on-demand Tours
- Hopscotch with tabset
- Issue with going back between multi-site steps between pages
- nextOnTargetClick doesn't work while animating in.
- onStart and onEnd being executed as soon as I start the tour. HOT 1
- How to set up onNext function, when using a database to set up the steps properties? HOT 11
- How to create multiple tours on one page? HOT 5
- sprite-green and sprite-orange don't work HOT 2
- Is it possible to fixe the "popup" on not fixed target
- Customizable theme (background color and text color)
- Visibility for templating and `setRenderer` HOT 1
- Add multiple pages for tour?
- Why previous and Next button displayed after some delay in safari 12.1?
- hopscotch and iframes
- Addclass not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hopscotch.