Skip to content

Commit

Permalink
Font size picker: use Button API for keeping focus on reset (#57221)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras authored Dec 19, 2023
1 parent e47ba1b commit a76800c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Bug Fix

- `FontSizePicker`: Use Button API for keeping focus on reset ([#57221](https://github.com/WordPress/gutenberg/pull/57221)).
- `FontSizePicker`: Fix Reset button focus loss ([#57196](https://github.com/WordPress/gutenberg/pull/57196)).
- `PaletteEdit`: Consider digits when generating kebab-cased slug ([#56713](https://github.com/WordPress/gutenberg/pull/56713)).
- `Button`: Fix logic of `has-text` class addition ([#56949](https://github.com/WordPress/gutenberg/pull/56949)).
Expand Down
13 changes: 5 additions & 8 deletions packages/components/src/font-size-picker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,11 @@ const UnforwardedFontSizePicker = (
{ withReset && (
<FlexItem>
<Button
aria-disabled={ isDisabled }
onClick={
isDisabled
? undefined
: () => {
onChange?.( undefined );
}
}
disabled={ isDisabled }
__experimentalIsFocusable
onClick={ () => {
onChange?.( undefined );
} }
variant="secondary"
__next40pxDefaultSize
size={
Expand Down

0 comments on commit a76800c

Please sign in to comment.