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

Shepherd step moves up and down continuously when target section is out of view #2965

Open
anusha-c18 opened this issue Sep 9, 2024 · 4 comments

Comments

@anusha-c18
Copy link

I am using Shepherd to create a tour for a large, scrollable form. One of the steps is attached to a specific section in the form, and scrollTo is disabled for the tour.

The issue occurs when the user scrolls up, causing the target section to move out of view. As a result, the Shepherd step shifts to the bottom of the screen. However, once the arrow of the step touches the bottom of the viewport, the step begins to jitter, moving up and down.

This behaviour stops when the user scrolls slightly upwards, so the arrow is no longer at the very bottom of the screen.

@chuckcarpenter
Copy link
Member

@anusha-c18 any chance you could submit a replication of this behavior in codesandbox or something like that? Also, would you expect the step to also scroll out of view or something else?

@anusha-c18
Copy link
Author

anusha-c18 commented Sep 19, 2024

So it isn't to do with the target being out of view as shown in the video where the target is the Advanced accordion.
I've attached a video for your reference

Screen.Recording.2024-09-19.at.3.17.50.PM.mov

Also, would you expect the step to also scroll out of view or something else?

Yes, that would be ideal. If the target scrolls out of view, the step should follow and move with it.

@anusha-c18
Copy link
Author

We resolved this issue by setting the position of the shepherd-element class to fixed.

@RobbieTheWagner
Copy link
Member

This seems like a bug in the flipping behavior. We try to flip and show on the other side if there is not room, so my assumption is it tries to flip and cannot so keeps trying back and forth because neither side has room. I wonder if there are any floating-ui bugs reported around 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

No branches or pull requests

3 participants