Skip to content
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

Dragging a reusable multi column block into itself, the block is messed up or removed. #12255

Closed
Fujix1 opened this issue Nov 23, 2018 · 3 comments · Fixed by #27887
Closed
Labels
[Feature] Drag and Drop Drag and drop functionality when working with blocks [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) Needs Dev Ready for, and needs developer efforts [Type] Bug An existing feature does not function as intended

Comments

@Fujix1
Copy link

Fujix1 commented Nov 23, 2018

When I drag a reusable block with a multi column block into itself, the block is messes up or removed.
This issue is similar to #9303
but it's not for a reusable block.

To Reproduce
Steps to reproduce the behavior:

  1. Insert a multi column block.
  2. Put any blocks in each column.
  3. Register the multi column block to a reusable block.
  4. Drag the block into itself.

Expected behavior
When a multi column block is in a reusable block, it should be locked and not accept dragging.

Screenshots
b234deccc35b30ced3f11fbf9f324666

8cf9e0a37c8dc836350351948807379f

Desktop:

  • OS: Windows 10
  • Browser: Chrome 70.0.3538.102, Firefox 63.0.3

Gutenberg version 4.5.1 and the Test Gutenberg web site.

@Fujix1 Fujix1 changed the title Dragging a reusable multi column block into itself, blocks are messed up or removed. Dragging a reusable multi column block into itself, the block is messed up or removed. Nov 23, 2018
@designsimply designsimply added [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) Needs Testing Needs further testing to be confirmed. [Feature] Drag and Drop Drag and drop functionality when working with blocks labels Nov 23, 2018
@talldan
Copy link
Contributor

talldan commented Mar 29, 2019

I gave this a test as there were some recent fixes to drag & drop in relation to columns.

Unfortunately it still seems like an issue.

What's unusual is that the user can't edit a reusable block normally without clicking the 'Edit' button, but can still modify it by dragging a block into the reusable block. That seems inconsistent.

@talldan talldan added [Type] Bug An existing feature does not function as intended and removed Needs Testing Needs further testing to be confirmed. labels Dec 12, 2019
@talldan
Copy link
Contributor

talldan commented Dec 12, 2019

Looks like I forgot to remove the Needs Testing label last time. I've just retested this and it still seems to be an issue:
reusable-inception

On some of the dropzones there didn't seem to be any effect though.

I think ideally the dropzones would be disabled unless the reusable block is being edited.

The second thing is that a user shouldn't be able to drop a block on itself, and I think in that case those dropzones within the block being dragged would ideally be disabled as targets.

@noisysocks
Copy link
Member

I think ideally the dropzones would be disabled unless the reusable block is being edited.

The second thing is that a user shouldn't be able to drop a block on itself, and I think in that case those dropzones within the block being dragged would ideally be disabled as targets.

Agreed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Drag and Drop Drag and drop functionality when working with blocks [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) Needs Dev Ready for, and needs developer efforts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants