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

Can't use FloutingUI autoPlacement #2583

Open
sirmspencer opened this issue Jan 23, 2024 · 1 comment
Open

Can't use FloutingUI autoPlacement #2583

sirmspencer opened this issue Jan 23, 2024 · 1 comment

Comments

@sirmspencer
Copy link

Shepherd adds flip and shift to default options, then does a deep merge with any other options passed in. Flip and autoPlacement are not compatible so adding autoPlacement to floatingUIOptions.middleware just causes errors.

I tried not passing in a placement so shouldCenter is true, but there are side effects in other parts of the code that block floating UI all together.

You could check for something like :on "auto" to skip adding flip. autoPlacement doesn't need a placement so you can skip options.placement = attachToOptions.on; too.

https://github.com/shepherd-pro/shepherd/blob/master/src/js/utils/floating-ui.js#L169

@patrikholcak
Copy link

Same here, version 12.0.1, if I pass on: 'auto' the step is positioned weirdly.

Popper.js Floating UI
Screenshot 2024-05-14 at 12 04 46 Screenshot 2024-05-14 at 12 04 49

Another problem is with passing offset middleware, when clicking between steps, the step jumps to its offset. Not sure if tied to the same problem

Screen.Recording.2024-05-14.at.12.10.52.mp4

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

2 participants