godaddy-wordpress / godaddy-wordpress/coblocks

ISBAT Transforming Masonry Block -> Gallery Block -> hovering another image block crashes the editor

Open
#2,416 2 comments 0 reactions 0 assignees View on GitHub
[Priority] Low [Type] Bug
Dominant language
JavaScript
Stars
794
Forks
142
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug:
Transforming Masonry Block -> Gallery Block -> hovering another image block crashes the editor.

### To reproduce:

1. Create a new page and add a Masonry Gallery Block with some images.
2. Save the draft and reload the page.
3. Transform the block into a Gallery Block.
4. Try to transform the Gallery Block into a Tiled Gallery.

### Expected behavior:

The block should switch from a Gallery block to another one.

I noticed that hovering is enough to trigger the error - you don't actually need to click on it.

What happens instead is that the editor crashes with the following error:

```
transform@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/coblocks/dist/coblocks-5.js?ver=9555ad71ff1545c28d56:55:12023
_t@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/blocks/index.min.js?ver=b94b3f7a5855f605f1fc:1:99871
Fm@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/block-editor/index.min.js?ver=1d7ce6dc82d711ff5290:51:1314
ft@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=6.0.1:1:43451
Wt@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=6.0.1:1:50270
ts@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=6.0.1:1:112276
Fr@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=6.0.1:1:77760
Dr@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=6.0.1:1:77688
Rr@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=6.0.1:1:77549
Nr@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=6.0.1:1:74544
n/Pn/<@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=6.0.1:1:30170
unstable_runWithPriority@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react.min.js?ver=6.0.1:1:7430
xn@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=6.0.1:1:29947
Pn@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=6.0.1:1:30117
Nn@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=6.0.1:1:30050
ia@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=6.0.1:1:116120
n/Xe/<@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=6.0.1:1:22443
Xe@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=6.0.1:1:22470
ge@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=6.0.1:1:16379
me@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=6.0.1:1:15616
unstable_runWithPriority@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react.min.js?ver=6.0.1:1:7430
he@https://seotestingdotblog.wpcomstaging.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=6.0.1:1:15467
```

### Screenshots:

![coblocks](https://user-images.githubusercontent.com/23258551/183883887-643dcdf7-66f4-40e9-a53f-041893dacaa5.gif)

### Isolating the problem:

- [X] This bug happens with no other plugins activated.
- [X] This bug happens with a default WordPress theme active
- [ ] This bug happens **without** the Gutenberg plugin active
- [X] I can reproduce this bug consistently using the steps above

### WordPress version:
6.0.1

### Gutenberg version:
13.8.1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.