Skip to content

List View: Dragging a large number of blocks at once throws the windowing logic #56361

@andrewserong

Description

@andrewserong

Description

If you have a very long post with heaps of blocks, and then go to drag a large selection of blocks (that scrolls off the edge of the list view screen), then the windowing logic becomes confused, resulting in blocks in the list becoming hidden.

I think this is likely to do with the visibility calculation incorporating dragged blocks, as they used to be hidden from view. I imagine the solution might be to update some of the calculations to no longer factor in dragged blocks.

Another possible cause could be if the selection contains blocks that fall outside the current visible window of blocks?

Step-by-step reproduction instructions

  1. Add a large number of blocks to a post (i.e. > 60)
  2. Select a large number of them from somewhere around the middle (but not all), say 30 or so, enough to go off the top edge of the screen
  3. Go to drag them, and see what happens to the block beneath the dragged blocks — they will likely become hidden

Screenshots, screen recording, code snippet

2023-11-21.16.51.01.mp4

Environment info

  • WP 6.4.1
  • Gutenberg trunk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] List ViewMenu item in the top toolbar to select blocks from a list of links.[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions