Skip to content

Droppable event ordering issue #968

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

Closed
wants to merge 3 commits into from
Closed

Droppable event ordering issue #968

wants to merge 3 commits into from

Conversation

wesleycho
Copy link

Fixes bug #9258. Previously, when two droppable elements were nested and an item was dropped on the child (with "greedy" disabled), the order in which the callbacks were called was determined only by the order in which they were bound. This PR changes it so that deeper droppable elements always have their callbacks called first.

@scottgonzalez
Copy link
Member

Thanks. We'll need you to sign our CLA before we can review this pull request.

@mikesherov
Copy link
Member

@wesleycho, thanks again for contributing! now that you've signed our CLA, can you clean up your patch to conform to our style guide: http://contribute.jquery.org/style-guide/js/ I know a lot of the surrounding code doesn't conform, but all new code should.

Also, we'll need a unit test with this pull request proving this fixes the bug. Can you add one

@wesleycho
Copy link
Author

I wrote up unit tests and made changes to conform to the style guide.

@mikesherov
Copy link
Member

@scottgonzalez, this looks right to me. Can you verify?

$( "<div id='draggable2'></div>" ).appendTo( "body" );
var droppable3 = $( "#droppable3" ),
droppable4 = $( "#droppable4" ),
draggable2 = $( "#draggable2" );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just store the references as we create the elements? They don't even need IDs then.

@scottgonzalez
Copy link
Member

Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants