Skip to content

Commit

Permalink
Fix Block Controls behavior for List Block. (#17876)
Browse files Browse the repository at this point in the history
When toggling between Bulleted List and Numbered List, the Block Controls for List block disappears. You have to click inside the block to get them back. Ideally, the Block Controls should always be present, if the block is selected.
  • Loading branch information
desaiuditd authored and ellatrix committed Oct 10, 2019
1 parent 8755372 commit 1ebb697
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions packages/block-library/src/list/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,8 @@ export default function ListEdit( {
const { ordered, values, reversed, start } = attributes;
const tagName = ordered ? 'ol' : 'ul';

const controls = ( { value, onChange } ) => {
if ( value.start === undefined ) {
return;
}

return <>
const controls = ( { value, onChange } ) => (
<>
<RichTextShortcut
type="primary"
character="["
Expand Down Expand Up @@ -115,8 +111,8 @@ export default function ListEdit( {
] }
/>
</BlockControls>
</>;
};
</>
);

return <>
<RichText
Expand Down

0 comments on commit 1ebb697

Please sign in to comment.