-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 group block moving animation not working correctly. #23084
Conversation
Size Change: +4 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
I still cannot reproduce the error. Regardless, it seems ok to have the check, though it would be good to understand the root problem. |
@talldan Did you find any steps that trigger the error consistently? |
@ellatrix Just the ones in the PR description. Both @draganescu and I could reproduce consistently using group blocks. Andrei mentioned he cleared all his caches and rebuilt from scratch before the issue appeared. |
I rebuilt, the page is loading without cache in Chrome, and I still cannot reproduce it with a group block... 😄 |
Description
Fixes #23047
I noticed block moving animations were not working correctly for some blocks (I found Group was the easiest one to recreate the issue). Blocks overlap when clicking the mover buttons and an error was being thrown in the console:
Pointing to these lines:
gutenberg/packages/block-editor/src/components/use-moving-animation/index.js
Lines 138 to 142 in 2e814da
Wrapping these lines in an if statement seems to solve the issue. I haven't looked too deeply into the root cause of the issue, but it might be that the
Animated
component that was in use before #22936 also had a similar check internally.How has this been tested?
Steps to reproduce the behavior:
Screenshots
Before
After
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: