Skip to content
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: Focus loss when “Clear” button is used in Styles > Color #69097

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

Rishit30G
Copy link
Contributor

@Rishit30G Rishit30G commented Feb 7, 2025

What?

Closes #60614

Why?

This PR is intended solve the issue that occurs when the user clicks on "Clear" in the style and the focus from the component losses resulting in stack of popovers if other options are opened

How?

This PR first of all makes the current "Clear" button visible at all times and also makes the disable state to true when the clearable is set to false

Testing Instructions

In the Site Editor
Go to Styles > Colors
Change a color to something other than the default
Use the “Clear” button
Notice focus is lost (palette dropdown doesn’t close as expected or if you are using the keyboard you're nowhere near where you were)

Screenshots or screencast

Before

Screen.Recording.2025-02-06.at.7.01.34.PM.mov

After

Screen.Recording.2025-02-07.at.6.52.06.PM.mov

@Rishit30G Rishit30G requested a review from ajitbohra as a code owner February 7, 2025 13:33
Copy link

github-actions bot commented Feb 7, 2025

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Rishit30G <[email protected]>
Co-authored-by: stokesman <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). labels Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Focus loss when “Clear” button is used in Styles > Color
2 participants