Skip to content

Block draggable chip's position is incorrect when dragging over an iframe #55074

@andrewserong

Description

@andrewserong

Description

The drag chip (the little icon that follows the mouse cursor around) is incorrectly positioned when dragging a block over the site editor canvas, or the post editor canvas when the post editor is iframed (i.e. running TT3 theme with core blocks).

This appears to be to do with the Draggable component's positioning when dragging over an iframe in particular.

Step-by-step reproduction instructions

  1. Open the site editor
  2. Go to edit a template or the site home
  3. Open the block inserter
  4. Drag a paragraph block to the editor canvas
  5. As you drag over the editor canvas, notice that the drag chip position flicks suddenly to the edge of the browser window

Screenshots, screen recording, code snippet

2023-10-05.16.55.20.mp4

The same issue appears to happen with the Draggable component in Storybook if you use the Docs view that shows all stories. This is a good way to test it because each preview occurs in an iframe, too, it seems. The URL for testing the Draggable component in Storybook is: https://wordpress.github.io/gutenberg/?path=/docs/components-draggable--docs

2023-10-05.16.57.57.mp4

Environment info

  • Gutenberg trunk on WP 6.3.1 (without GB running, the position is correct in 6.3.1)
  • WP 6.4 Beta 1 (without GB running)

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] UI ComponentsImpacts or related to the UI component system[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions