[Bug]: Click events prevented after scrolling using embla-carousel-wheel-gestures plugin #1149
Open
4 of 15 tasks
Labels
bug
Something isn't working
Which variants of Embla Carousel are you using?
Steps to reproduce
dragFree: true
embla-carousel-wheel-gestures
pluginwatchDrag: (emblaApi, e) => (emblaApi.containerNode() === e.target)
: basically trying to disable click+drag but allow wheel gesture plugin's simulated mousemove eventsonClick
handlers insideExpected Behavior
Additional Context
I investigated thinking this might be a plugin problem, but when looking at the source of
embla-carousel
, it seems likepreventClick = true
is set in themousemove
handler. I don't think there is a corresponding way for a plugin to unset it, which might make sense to do inmouseup
.My next thought is maybe to dispatch a simulated click event knowing that the first one will be ignored, but that feels pretty dirty. Maybe translating wheel events into mouse movement events in a plugin isn't the ideal approach for the plugin in the first place and it should be setting the position more directly?
What browsers are you seeing the problem on?
All browsers
Version
8.3.1
CodeSandbox
No response
Before submitting
The text was updated successfully, but these errors were encountered: