-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix column moved in itself error #13941
Conversation
…fix/column-moved-in-itself
Co-Authored-By: Naerriel <naerriel@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gave this a further test, it works well. I tried a few different blocks with inner blocks including third-party ones from the coblocks and stackable plugins. All were prevented from being dragged inside themselves 😄
Also confirmed that normal dragging and dropping still works.
Good job @Naerriel, keep up great work 🥇 |
* Fix column moved in itself error * Update packages/editor/src/components/block-drop-zone/index.js Co-Authored-By: Naerriel <naerriel@gmail.com>
* Fix column moved in itself error * Update packages/editor/src/components/block-drop-zone/index.js Co-Authored-By: Naerriel <naerriel@gmail.com>
Description
Closes: #13701
The bug is that empty column has no children and
dstClientId
wasundefined
, therefore it could not be recognized as moved block's child.In solution I assumed that each 2 blocks that can be moved in each other are always separated by a
core/column
block.If that assumption is incorrect or unsustainable I can leave:
and just add:
along the previous version.
How has this been tested?
Screenshots
Types of changes
Bug fix
Checklist: