You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am experiencing an issue with a draggable component. When on mobile I can drag only once before I cannot drag anymore. If I exit Chrome dev tools mobile view, I can then continue to drag without issue. I have a very similar component that works as expected in both desktop and mobile views.
// Dragging element an element inside the deadzone will not trigger next or previous video
const handleStop = (event, dragElement) => {
if (dragElement.y >= 120 || dragElement.y <= -120) {
dragElement.y > 0 ? props.previousVideo() : props.nextVideo();
}
};
// Below are the Prop functions from previous component above. The posts below come from an API request. The logic triggers correctly when on the desktop view. The mobile view works as well, but only once as the drag stops working without an error message.
Same issue on v4.4.6. The drag on mobile only works the first time, then you have to tap a lot of times fastly on the element and it may be dragged again.
Hello, I am experiencing an issue with a draggable component. When on mobile I can drag only once before I cannot drag anymore. If I exit Chrome dev tools mobile view, I can then continue to drag without issue. I have a very similar component that works as expected in both desktop and mobile views.
// Dragging element an element inside the deadzone will not trigger next or previous video
const handleStop = (event, dragElement) => {
if (dragElement.y >= 120 || dragElement.y <= -120) {
dragElement.y > 0 ? props.previousVideo() : props.nextVideo();
}
};
return (
<Draggable
axis="y"
position={{ x: 0, y: 0 }}
onStop={handleStop}
allowAnyClick={true}
>
);
// Below are the Prop functions from previous component above. The posts below come from an API request. The logic triggers correctly when on the desktop view. The mobile view works as well, but only once as the drag stops working without an error message.
const previousVideo = () => index > 0 ? setIndex(index - 1) : "";
const nextVideo = () => {
if (index != posts['data']['children'].length && !requested) {
if (index == posts['data']['children'].length - 1) {
setRequested(true);
more("page");
} else {
setIndex(index + 1);
}
}
}
The text was updated successfully, but these errors were encountered: