From 642be162d73290826b04ce0e4b865a3da9775681 Mon Sep 17 00:00:00 2001 From: Daniel Valenzuela Date: Mon, 7 Jul 2025 18:34:21 -0400 Subject: [PATCH] fix: open component with keyboard within unit page (#2256) When selecting a component inside a unit with the keyboard, opening it in the sidebar by pressing enter was not working. --- src/library-authoring/units/LibraryUnitBlocks.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/library-authoring/units/LibraryUnitBlocks.tsx b/src/library-authoring/units/LibraryUnitBlocks.tsx index 7c1ff0e7b..bcc2bd317 100644 --- a/src/library-authoring/units/LibraryUnitBlocks.tsx +++ b/src/library-authoring/units/LibraryUnitBlocks.tsx @@ -182,6 +182,11 @@ const ComponentBlock = ({ block, readOnly, isDragging }: ComponentBlockProps) => }} isClickable={!readOnly} onClick={(e) => !readOnly && handleComponentSelection(e.detail)} + onKeyDown={(e) => { + if (e.key === 'Enter') { + handleComponentSelection(e.detail); + } + }} disabled={readOnly} cardClassName={sidebarItemInfo?.id === block.originalId ? 'selected' : undefined} >