Closed stvmachine closed 4 years ago
So, my solution to this problem is something like this:
componentDidMount(){
...
this.addEventListenerWithClear("click", this.handleOnClick);
}
handleOnClick = e => {
const { time } = this.privateState;
// don't do nothing with the click event
if (!time || time > this.threshold) {
if (e.stopPropagation) e.stopPropagation();
if (e.preventDefault) e.preventDefault();
e.cancelBubble = true;
e.returnValue = false;
return false;
}
// just let the click event happens
};
hey @stvmachine sorry for not responding in a long time, for some reason i didn't get an email from this, did you solve this issue? are you using the clickItem
callback ?
I was wondering if anyone had an issue with click event being fired after drag and drop.
Is there an easy way to prevent this from happening?