responsive_carousel
responsive_carousel copied to clipboard
Trackpad "tap to click" incompatibility
On my Mac, I have the "tap to click" option turned on for my trackpad. The slider-nav arrows of the responsive carousel don't seem to respond to these taps. Instead, I have to physically click my trackpad for the gesture to be recognized. This is very unusual. I can't recall encountering any other case where a tap was interpreted differently from a physical button click in the past.
I believe the problem starts around line 449. Basically, I disable clicks and go with mousedown for non-touch devices. I did this as an attempt to prevent the "Save Dialog" from popping up on Android devices when the navigation arrows were anchor tags. I will re-think the logic here and get it working for you.
The problem is that when tapping on a Mac trackpad, the mouseup
triggers immediately after mousedown
, and that there is a delay before the animation starts in the eventStringDown
listeners since it uses setInterval
.
Solution: add a direct call to that._doArrowBeingClicked
before the window.setInterval
in the eventStringDown
listeners (for right and left arrow). (Line 584 and 605)