Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions packages/block-editor/src/components/off-canvas-editor/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,27 +325,28 @@ function ListViewBlock( {

{ showBlockActions && (
<>
<TreeGridCell
className={ listViewBlockEditClassName }
aria-selected={
!! isSelected || forceSelectionContentLock
}
>
{ ( props ) =>
isEditable && (
{ isEditable && (
<TreeGridCell
className={ listViewBlockEditClassName }
aria-selected={
!! isSelected || forceSelectionContentLock
}
>
{ ( props ) => (
<BlockEditButton
{ ...props }
label={ editAriaLabel }
clientId={ clientId }
/>
)
}
</TreeGridCell>
) }
</TreeGridCell>
) }
<TreeGridCell
className={ listViewBlockSettingsClassName }
aria-selected={
!! isSelected || forceSelectionContentLock
}
colSpan={ isEditable ? 1 : 2 } // When an item is not editable then we don't output the cell for the edit button, so we need to adjust the colspan so that the HTML is valid.
>
{ ( { ref, tabIndex, onFocus } ) => (
<BlockSettingsDropdown
Expand Down