Fix: Focus loss when “Clear” button is used in Styles > Color #69097
+2
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theclearable
is set to falseTesting 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