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

Disable isDragging when element is destroyed #150

Merged
merged 1 commit into from
Oct 19, 2017

Conversation

nbibler
Copy link
Contributor

@nbibler nbibler commented Aug 16, 2017

While debugging an issue in an application, we came across a case where the act of dragging an element caused re-renders and actively-dragging-element destruction.

In this scenario, ember-sortable would endlessly scroll the page to the top of the screen because the isDragging flag remained true (once dragging began) even after the element was destroyed. This occurred because the _scrollOnEdges method uses requestAnimationFrame to recursively call itself while dragging. If the element is destroyed and isDragging is forever true, these recursive calls will never end.

@jgwhite
Copy link
Contributor

jgwhite commented Oct 18, 2017

Thank you so much for this submission. I’m really sorry it hasn’t received any attention. I hope to devote the time to reviewing it soon.

@jgwhite jgwhite merged commit aca68a4 into adopted-ember-addons:1.x Oct 19, 2017
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