-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
[Bug]: Slide hanging if overdragged/scrolled #785
Comments
Hi @DanielSpindler, This was reported by @sarussss here but I haven’t had the time to create a bug report: Thanks for doing it for me. Best, |
Thanks alot and no Problem! Greetings, |
hey guys, running into the same issue with the embalaApi.on('settle', (api: CarouselApi) => {
if (!api) {
return;
}
const { limit, location, scrollTo } = api.internalEngine();
if (location.get() > limit.max) {
scrollTo.index(0, 0);
}
if (location.get() < limit.min) {
scrollTo.index(embalaApi.scrollSnapList().length - 1, 1);
}
}); Ideally it would be nice to reset the momentum early so it never gets to this or take so long to rubber band back. |
@DanielSpindler and/or @sarussss, Can you reproduce this problem in this CodeSandbox? |
Hi @davidjerleke |
https://codesandbox.io/p/sandbox/embla-carousel-default-react-forked-vcjj84?file=%2Fsrc%2Fjs%2FEmblaCarouselArrowButtons.tsx updated the other CodeSandBox for now @davidjerleke, @sarussss seems like it is not gone, will update it in a live app today and give a feedback after |
@DanielSpindler did you try the CodeSandbox in this comment? Because a fix for this has not released yet! |
@davidjerleke my fault ive been reading it wrong sorry! do you have a version with |
@DanielSpindler you can fork the CodeSandbox and add the Wheel Gestures plugin and test it if you want. |
@davidjerleke https://codesandbox.io/p/sandbox/bug-785-forked-psk7k8?file=%2Fsrc%2Fjs%2Fembla-carousel.js%3A1857%2C25-1857%2C30 seems to work just fine, cant reproduce anymore |
Thanks @sarussss and @DanielSpindler. I'll throw a comment in here once the bug fix has been released. |
Which variants of Embla Carousel are you using?
Steps to reproduce
The bug occurs when I "overscroll/drag" the slides
i got an example sandbox https://codesandbox.io/p/sandbox/embla-carousel-default-react-ww73yq?file=%2Fsrc%2Fjs%2FEmblaCarouselArrowButtons.tsx from the docs and tried it there to reproduce.
Bildschirmaufnahme.2024-03-05.um.18.01.08-1.mov
Expected Behavior
Jumping back
Additional Context
I have also tried :
Google Chrome
Firefox
Safari
And also tried to implement a "overscroll" workaround from the issues which sadly jumped around, but not related.
I've searchd the issues and docs throughly and found nothing that could be directly related.
What browsers are you seeing the problem on?
No response
Version
v8.0.0
CodeSandbox
https://codesandbox.io/p/sandbox/embla-carousel-default-react-ww73yq?file=%2Fsrc%2Fjs%2FEmblaCarouselArrowButtons.tsx
Before submitting
The text was updated successfully, but these errors were encountered: