-
-
Notifications
You must be signed in to change notification settings - Fork 457
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
Fixed Copy:true elements are not sortable after drop #337
Conversation
Hey @mfriesen, thank you very much. It is a nice idea! It might be due to using One way of solving this could be similar to #338 and adding a |
@lukasoppermann Have a look now. I think I got everything working. I added logic to find the correct sortable from the e.target |
Nice, will have a look as soon as possible, thank you. |
@@ -560,6 +595,8 @@ export default function sortable (sortableElements, options) { | |||
}, options.debounce) | |||
// Handle dragover and dragenter events on draggable items | |||
var onDragOverEnter = function (e) { | |||
var element = e.target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This element is a <td>
in tables, which is why it does not work for tables. We need to this because it means tables currently don't work.
Maybe you can just use .closest(options.item)
because closest
should return the item, if it matches the selector and go up the dom tree if it does not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still a problem, as it still returns <td>
Hey, so I merged #343 which sadly makes this PR "break". However the adjustments are minor:
Sorry for the inconvenience, I just needed to merge this so #259 can be started. Looking forward to your update. Maybe you can just use |
@lukasoppermann I've fixed the branch |
Hey, sorry, but I think it is not fixed yet. The table still does not work, as |
@lukasoppermann I think it's all fixed now. |
Neat, thank you. I will give the master branch a bit more manual testing and than we can build another release with the copy feature included. 👍 |
This Pull Request fixes the #311 issue.
I changed the drag/drop events to work at the SortableElement level, so when elements are added to a SortableElement, the automatically inherit all events.