Skip to content

Commit

Permalink
ToolbarButton: Defer fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mirka committed Jul 2, 2024
1 parent d80ba0e commit 74c34ef
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/components/src/toolbar/toolbar-button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ function UnforwardedToolbarButton(
className
) }
isPressed={ isActive }
// TODO: Should be focusable disabled, but adding `__experimentalIsFocusable` will trigger a
// focus bug when ToolbarButton is disabled via the `disabled` prop.
// Must address first: https://github.com/WordPress/gutenberg/issues/63070
// eslint-disable-next-line no-restricted-syntax
disabled={ isDisabled }
data-toolbar-item
{ ...extraProps }
Expand All @@ -85,6 +89,10 @@ function UnforwardedToolbarButton(
<Button
label={ title }
isPressed={ isActive }
// TODO: Should be focusable disabled, but adding `__experimentalIsFocusable` will trigger a
// focus bug when ToolbarButton is disabled via the `disabled` prop.
// Must address first: https://github.com/WordPress/gutenberg/issues/63070
// eslint-disable-next-line no-restricted-syntax
disabled={ isDisabled }
{ ...toolbarItemProps }
>
Expand Down

0 comments on commit 74c34ef

Please sign in to comment.