Skip to content

Grid resizers not working well when resizing an embed block down #63279

@tellthemachines

Description

@tellthemachines

Description

When a block containing an iframe, such as a YouTube embed, is placed within a Grid block and set to span multiple columns, trying to resize it down to a smaller size with the handles doesn't always work as expected, especially when resizing over the iframe area itself (dragging the handles over the caption space below works fine).

This is likely because the event listeners responsible for the resizing can't follow events inside the area of the iframe.

Step-by-step reproduction instructions

  1. Add a Grid block to a post or template;
  2. Add a YouTube block inside it, and resize it to take up two columns;
  3. Try to resize the block back down to one column with the resize handles and observe the flaky behaviour.

Screenshots, screen recording, code snippet

resizers-on-iframe.mp4

Environment info

Latest Gutenberg and also WP 6.6.

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

Labels

[Feature] LayoutLayout block support, its UI controls, and style output.[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions