I have a carousel that contains tags that link to details of movie. However, if you drag the mouse to rotate the carousel, when you drop it will redirect. How to prevent this?
I using ReactJs and my code look like:
<Link
to={"/detailfilm/" + data._id + "/" + data.title}
draggable="false"
>
...
</Link>
Create a class something like disable and add it while dragging and remove it on drag end.
.disable {
pointer-events: none;
}
Good Juan, was it like that for you? I am doing something similar but when I drag when adding that class it does not let me continue dragging