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

Reusable Blocks respond erratically when external media files are dragged & dropped into them #22405

Closed
mrfoxtalbot opened this issue May 18, 2020 · 0 comments · Fixed by #27887
Labels
[Feature] Drag and Drop Drag and drop functionality when working with blocks [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Bug An existing feature does not function as intended

Comments

@mrfoxtalbot
Copy link

mrfoxtalbot commented May 18, 2020

Describe the bug
It is currently possible to drag and drop a file from your computer into an existing reusable block. From the editor, it will look like the file was added, but it will not be saved and in some instances it will make the editor crash.

To reproduce
Steps to reproduce the behavior:

  1. Create a new post, add a reusable block that has at least two blocks in it.
  2. Drag & drop an image from your computer inside the reusable block
  3. Click on preview > The newly added image will not be inside the reusable block
  4. Click on "edit reusable block" > The reusable block will become editable but the image will disappear

Expected behavior
The drag & drop action should either edit the reusable block directly (then add the image to it and change its state to "being edited") or prevent the user from dropping a file inside at all.

Screenshots
With the Core version of Gutenberg (5.4.1) the image will just disappear if you reload the editor, try to preview it or edit the reusable block:
ezgif-4-9ee65ac962a1

With the plugin version of Gutenberg (8.1.0) this action will cause the editor to crash:
ezgif-4-bb98b22cd1c6

Editor version

  • WordPress version: 5.4.1
  • The error occurs with and without the plugin, but varies slightly (see above)
  • If the Gutenberg plugin is installed, which version is it? 8.1.0

Desktop
MacOS 10.13.6 (17G2307)
Google Chrome 79.0.3945.88

@talldan talldan added [Feature] Drag and Drop Drag and drop functionality when working with blocks [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Bug An existing feature does not function as intended labels May 18, 2020
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) [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants