From 74c34ef79d16b4ab763fc9f78b4c7713f8f5b7de Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Wed, 3 Jul 2024 08:04:08 +0900 Subject: [PATCH] ToolbarButton: Defer fix --- packages/components/src/toolbar/toolbar-button/index.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/components/src/toolbar/toolbar-button/index.tsx b/packages/components/src/toolbar/toolbar-button/index.tsx index ea18c3a23e3ab8..34a577bbd61081 100644 --- a/packages/components/src/toolbar/toolbar-button/index.tsx +++ b/packages/components/src/toolbar/toolbar-button/index.tsx @@ -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 } @@ -85,6 +89,10 @@ function UnforwardedToolbarButton(