Reusable Blocks respond erratically when external media files are dragged & dropped into them #22405
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
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:
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
![ezgif-4-9ee65ac962a1](https://user-images.githubusercontent.com/4452464/82179799-7b2e9200-98df-11ea-99d4-938e1d4b9164.gif)
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:
With the plugin version of Gutenberg (8.1.0) this action will cause the editor to crash:
![ezgif-4-bb98b22cd1c6](https://user-images.githubusercontent.com/4452464/82179592-00657700-98df-11ea-9bec-ec234384576f.gif)
Editor version
Desktop
MacOS 10.13.6 (17G2307)
Google Chrome 79.0.3945.88
The text was updated successfully, but these errors were encountered: