react-draggable
react-draggable copied to clipboard
fix(user-select): move addUserSelectStyles from handleDragStart to ha…
If it's just a simple click, don't modify the DOM.
This will add the styles multiple times, I doubt that is desired.
This will add the styles multiple times, I doubt that is desired.
This is indeed a problem, Maybe we need an extra if in handledrag.
However, it is necessary not to add styles when clicking. Because in actual development, we do have two different types of logic: click and drag. When there are too many heavy GridItems, click can cause some performance problems
@STRML
Hello,
I found that addClassName already has logic to avoid duplicate classes. However, I can add another hasUserSelectStyles judgment if necessary.