-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Javascript error when editing shadow after resetting styles #65930
Comments
My instinct tells me that this is not the same issue as #65774, since it's not triggered by leaving the shadows screen. I'll timebox an effort and see if I can come up with a fix I believe the issue is that, when resetting styles, the current shadow entry gets removed. And therefore, and subsequent edit can't be applied (and triggers an error), because it's trying to edit a shadow that doesn't exist anymore in the settings. We should probably just navigate back to the parent screen when resetting styles. |
@benniledl @nith53 can you test if #65935 fixes it? It's a draft for now, but I'm going to add a proper description/screencast in a bit |
@ciampo sorry I'm not sure how I can test a gutenberg PR, |
I think this is correct. The font size preset implementation relies entirely on the On the other hand, the shadow panel logic is a little different, and it keeps the preset obtained via the Shadow presets may need to be refactored in the future to not depend on the state, but the approach attempted in #65935 is similar to that of font size presets and I think it makes sense. |
The easiest way to test the changes is to visit https://playground.wordpress.net/gutenberg.html and input the PR number (ie. If you want to run a local version of the code on your machine, you can follow this documentation. |
Agreed, aki! |
Tested via the Playground. The issue seems to be resolved. |
Description
Similar issue as #65774 exists for Shadows
For details visit #65774
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Blog.Home.Template.Testsite.Editor.WordPress.Mozilla.Firefox.2024-10-08.08-29-32.mp4
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
The text was updated successfully, but these errors were encountered: