-
Notifications
You must be signed in to change notification settings - Fork 540
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
Tour doesn't autoscroll, even when disableScrolling = false #407
Comments
Is the scrolling working in the demo? It's impossible to know what is going on without seeing your setup running... |
Same problem. The config is: const joyrideConfig = {
scrollToFirstStep: true,
showProgress: true,
showSkipButton: true,
disableOverlay: false,
disableOverlayClose: false,
disableScrolling: false
}
const defaultStyles = {
arrowColor: Colors.menuBlue,
backgroundColor: Colors.menuBlue,
beaconSize: 36,
overlayColor: 'rgba(0, 0, 0, 0.4)',
primaryColor: Colors.red,
spotlightShadow: '0 0 15px rgba(0, 0, 0, 0.5)',
textColor: '#fff',
zIndex: 100
} Everything is highlighted fine. But doesn't scroll on step change. Also highlighted (via overlay) area is weirdly moving up on page scroll sometimes. What do you mean at "problem with your CSS"? |
@andreystarkov Is the scrolling working in the demo? |
@nickbae91 @andreystarkov Are you both working on the same project or it is a different issue? |
@gilbarbara ofc no! i just faced with same problem right now in my project. |
For what it's worth, I hit this too. Haven't had time to create a reduced test case yet. I feel like I'm playing by the rules though -- I'm curious to see what the cause is. |
@gilbarbara if by demo, you mean https://2zpjporp4p.codesandbox.io/, yes it works fine for me. I've tried removing the props, fixing them at {false} to get things to work, and ensured I didn't have the CSS file from v1 (per https://github.com/gilbarbara/react-joyride/blob/master/docs/styling.md). Moreover, unlike @andreystarkov 's setup, I haven't configured CSS in any way. I'm not sure how easy it'll be for me to recreate a minimal reproducible code, but I'll give it a shot. Is there anything in particular (incl. the CSS stuff you suspected) that I should look out for? |
@nickbae91 Make sure the body (or any other parent container) doesn't have a fixed height. body {
height: 100vh; /* bad */
min-height: 100vh; /* good */
} |
If the placement is set to bottom, then it will not scroll to show at the bottom but will try to squeeze show at the top. In this case and scrolling the page, the tooltip placement then moves to the bottom. The initial auto scroll does not seem to be triggering. |
It's impossible to find the problem without a publicly accesible example. |
Okay this duplicates it for me. Go to Controlled and the tour will start on mount. https://codesandbox.io/s/morj927qx9 It's possible that scrollToFirstStep has some to do with it. |
Ive found something:
and that did the trick. I can open a PR to fix this, but i don't know yet if it has side effects. |
@guilherme-otran |
Good point @gilbarbara. Do you think we can take this approach? |
Is there a workaround for now or a recommended previous release to revert to? |
@guilherme-otran |
I'm experiencing the same on Firefox and Safari as well. The first issue was to do with having |
I think this shows one of the things I'm seeing in my app. I've edited the Basic example and moved the target of the second step to be at the top of the containing div. When you click on the "Let's Go!" button (which now appears further down the page than the original example), it doesn't scroll to the target for the second step: https://codesandbox.io/s/5vmnlwl4yx |
@charlieharris1 watch out for #376 also. Issues that came from having an |
I fixed some of these problems in |
|
I had the same issue. Was fixed when I set the |
@bertom You just need a single statement in you CSS: *,
*:before,
*:after {
box-sizing: border-box;
} |
The tour works fine (continuous, step callbacks, etc.), but this auto-scrolling is the only part that's not working. I looked into the console to see if there was anything, but no luck (it actually proves that I set-up the "disableScrolling = false" correctly:
Not sure why this wouldn't be working (it's a fairly simple set-up), and am lost on where to start... Any thoughts?
Please lmk if you require more details!
If you want to get this issue fixed quickly, make sure to send a public URL or codesandbox example.
The text was updated successfully, but these errors were encountered: