Embla-carousel: Settle event is not triggered when draggable is set to false

Created on 10 Oct 2020  路  5Comments  路  Source: davidcetinkaya/embla-carousel

Describe the bug
The settle event works as expected if the user only navigates with the left/right arrows. If the user tries to swipe first and uses the arrows again, the event is not triggered at all.

To Reproduce
https://codesandbox.io/s/embla-carousel-default-react-forked-cs8fb?file=/src/js/EmblaCarousel.js

Additional context
I'm doing page transitions at the end of each project/slide. It works perfectly with draggable: true, but I'd need to disable this feature on desktop.

Browser
Firefox 81.0, macOS

not a bug resolved

All 5 comments

Hello Thomas (@th-km),
Thank you for taking time to create an issue with a helpful description and CodeSandbox 馃憤.

It seems like you're using v4.0.1. What happens if you update your Embla Carousel package to the latest which is v4.0.5? I think this bug is caused by the same problem that caused issue #87. The bug fix for issue #87 was released with v4.0.3.

Let me know if it helps.

Best,
David

Hey @davidcetinkaya, indeed it works with v4.0.5.

I'm using v4.02 in production that would explain my bug. Thanks a lot for the quick answer!
Btw the v4 with the hooks is awesome 馃憤

Hello again Thomas (@th-km),

I'm happy to hear that it's working as expected 馃檪.

Thanks for the feedback on the refactored hook! The old implementation had some issues and I think v4 solved them and made Embla Carousel much more React friendly. Most of the credit goes to @xiel for his efforts 馃帀.

So I'm closing this issue then?

Kindly,
David

It works like a charm with React for sure. You can close the issue 馃憤

Enjoy 馃檪!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nikrowell picture nikrowell  路  7Comments

cliffordfajardo picture cliffordfajardo  路  5Comments

maiconrs95 picture maiconrs95  路  5Comments

iamchanii picture iamchanii  路  5Comments

korsvanloon picture korsvanloon  路  3Comments