This repository was archived by the owner on Mar 10, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If you use a drag and drop method that has the dndDraggingSource class removing the dragging source (such as this demo http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/nested) you might notice that, on old browsers, you'll see a flicker on drag start. In my own testing the list had to be 10+ items to notice it.
What we're seeing is the removal of the source item from the visible DOM (when 'dndDraggingSource' is applied) in one tick, and then the placeholder being added to the list in a future tick.
This PR changes makes it so as long as the item is in a dnd-list, the 'dndDraggingSource' class isn't applied until the placeholder is inserted, thus eliminating the UI flicker.
FYI this is especially noticeable on mobile devices.