-
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: Unable to remove custom colors on safari. #62554
Fix: Unable to remove custom colors on safari. #62554
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: +48 B (0%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
Flaky tests detected in e520dbe. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9502486739
|
This doesn't seem to fix it for me. I confirmed that the button has a z-index. Kapture.2024-06-14.at.13.56.49.mp4 |
It seems the issue is related to the onStopEditing method. It is triggered first, and because it clears the currently edited element, the Remove color method isn't triggered (it relies on That means, the On the other side, the Based on my review, it looks like the hook should be optimized so it doesn't trigger when a child component with an |
Thank you for the tests @noisysocks and thank you for the debugging @aatanasovdev. I'm exploring a different fix #62628. |
Fixes: #62261
To be honest I don't know the root cause of the issue. It seems to happen only on Safari. I tried many many fixes and this combination of changes seem to work:
cc: @noisysocks and @richtabor in case you can confirm if the issue is also fixed for you.
Testing Instructions
Use Safari.
Go to Appearance → Editor → Colors → Palette.
Add a custom color and press Done.
Click the button to remove that custom color and see if it works as expected.