daybrush / selecto

Selecto.js is a component that allows you to select elements in the drag area using the mouse or touch.
https://daybrush.com/selecto
MIT License
2k stars 81 forks source link

Clicking a single item to deselect items makes the clicked item follow the cursor until clicked again (sticky element) #141

Closed davidalejandroaguilar closed 12 months ago

davidalejandroaguilar commented 1 year ago

Environments

Description

When clicking a single item of selected items, the element sticks to the cursor and follows the mouse around until you click again.

The expected behavior is that the single click on one of the selected items, selects one item and the item doesn't automatically follow the cursor.

This happens in every example in the Moveable and Selecto storybooks too. Example here.

https://github.com/daybrush/selecto/assets/15317732/112d868a-f088-406a-b896-b87c91c099a6

If you change selectFromInside to true, the issue is fixed, but now you can't click and drag a single item, you have to click and drag to select:

https://github.com/daybrush/selecto/assets/15317732/82c313d2-7e61-4632-b16d-7d3c29afc8b1

daybrush commented 1 year ago

@davidalejandroaguilar

selecto's new version is released. Check it again

davidalejandroaguilar commented 12 months ago

Thank you very much!