Group Block: randomly unable to successfully drag & drop in List View
Description
When trying to drag and drop a row block (variation of group) in List View, drag and drop randomly does not work causing the blocks selected to remain in their current location. It's not clear what the pattern is but it is replicable.
This was originally found in the sixteenth call for testing for the FSE Outreach Program:
In the list view, when I drag and drop the row:
- sometimes (about a third of the time), the row does not move, it just bounces back to where it was.
- I have seen this behavior often in the list view when I drag and drop things to move around.
It is a mystery to me when or why this happens. It seems to happen more when I drop to the end of the post, but it also happens when I drop the row between two paragraphs. This behavior stops and starts and I cannot tell why. It seems like once the problem starts, it continues until I drag and drop another block.
Step-by-step reproduction instructions
- Open the Post Editor.
- Add a Row block with two images and a spacer between them along with various other pieces of content (images, paragraphs, etc)
- Open List View.
- Try to drag and drop the row block throughout the other blocks on the post.
- Notice that it randomly fails.
Screenshots, screen recording, code snippet
https://user-images.githubusercontent.com/26996883/188518670-f6f40271-8e47-4b7b-8144-7bd10b303138.mov
Environment info
- WordPress 6.0.2
- GB 14.0.2
- TT2
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
I think it happens whenever you drop on the empty space after the list of blocks. The same happens with normal block drag and drop, and list view uses most of the same code - https://github.com/WordPress/gutenberg/issues/32438
edit: oh yeah, I see it was mentioned in that issue.
Yes, it is quite difficult to reproduce this. However, I can still reproduce this with the same environment Anne shared
https://user-images.githubusercontent.com/41231764/191760368-9f2df510-810d-4d33-841a-a62ddf0b42bc.mov
WordPress 6.0.2 Gutenberg 14.0.2 active and deactivated TT2
I believe this issue has largely been addressed now between https://github.com/WordPress/gutenberg/pull/49742 and https://github.com/WordPress/gutenberg/pull/50726 (allow dragging outside of the immediate list view area).
I'll close out this issue now, but do feel free to re-open if the issue recurs.