Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug when you use SortableHandle and distance prop. #447

Merged
merged 2 commits into from
Nov 23, 2018
Merged

Fix a bug when you use SortableHandle and distance prop. #447

merged 2 commits into from
Nov 23, 2018

Conversation

alexandcote
Copy link
Contributor

@alexandcote alexandcote commented Nov 22, 2018

I found an issue when you set a distance and you use SortableHandle.
After you click on the handle, you are able to drag the element from everywhere inside the li.

Before After
2018-11-20 19 39 58 2018-11-20 19 42 48

So the main problem comes from here. During the handleStart we set the manager.
But inside the handleEnd we never unset the manager if the distance prop was set. You can check the code here. It's true that we shouldn't call clearTimeout(this.pressTimer); when you had set a distance because you can't set both properties (distance | pressDelay).

Feel free to ask me for changes if you find a better approach ✌️

redking added a commit to DataDog/react-sortable-hoc that referenced this pull request Nov 23, 2018
@clauderic clauderic merged commit 171b92e into clauderic:master Nov 23, 2018
@clauderic
Copy link
Owner

Just shipped [email protected] with this bug fix, thanks for submitting this PR

@alexandcote alexandcote deleted the fix-handle-problem branch December 3, 2018 20:18
kiejo pushed a commit to Nuclino/react-sortable-hoc that referenced this pull request Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants