react-draggable icon indicating copy to clipboard operation
react-draggable copied to clipboard

fix(user-select): move addUserSelectStyles from handleDragStart to ha…

Open fxxjdedd opened this issue 5 years ago • 3 comments
trafficstars

If it's just a simple click, don't modify the DOM.

fxxjdedd avatar Dec 28 '19 08:12 fxxjdedd

This will add the styles multiple times, I doubt that is desired.

STRML avatar Apr 10 '20 21:04 STRML

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

fxxjdedd avatar Apr 11 '20 00:04 fxxjdedd

@STRML Hello, I found that addClassName already has logic to avoid duplicate classes. However, I can add another hasUserSelectStyles judgment if necessary.

fxxjdedd avatar Apr 14 '20 07:04 fxxjdedd