DropZone component no longer provides x and y position #23149
Labels
[Feature] Drag and Drop
Drag and drop functionality when working with blocks
[Status] In Progress
Tracking issues with work in progress
[Type] Developer Documentation
Documentation for developers
Describe the bug
(Originally reported in the Making WordPress slack: https://wordpress.slack.com/archives/C02QB2JS7/p1591999141128800)
The
DropZone
component no longer providesx
andy
position to its callback.It looks like when
DropZone
was rewritten to use a hook an optionalwithPosition
prop that defaults to a falsey was added, possibly as an optimization:gutenberg/packages/components/src/drop-zone/index.js
Line 24 in f15b91c
The
DropZone
component doesn't have a way to set this value, so since this changex
andy
are not provided:gutenberg/packages/components/src/drop-zone/index.js
Lines 67 to 73 in f15b91c
To reproduce
Steps to reproduce the behavior:
Reproduction is a little tricky, as it requires implementation of a drop zone.
Expected behavior
DropZone
continues to providex
andy
position data by default.The text was updated successfully, but these errors were encountered: