Skip to content

Commit

Permalink
Fix unable to get block refs in widgets customizer (#31262)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin940726 authored Apr 28, 2021
1 parent c0bf8f5 commit e32c704
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ export default function SidebarBlockEditor( {
</ObserveTyping>
</WritingFlow>
</BlockSelectionClearer>
</SidebarEditorProvider>

{ createPortal(
// This is a temporary hack to prevent button component inside <BlockInspector>
// from submitting form when type="button" is not specified.
<form onSubmit={ ( event ) => event.preventDefault() }>
<BlockInspector />
</form>,
inspector.contentContainer[ 0 ]
) }
{ createPortal(
// This is a temporary hack to prevent button component inside <BlockInspector>
// from submitting form when type="button" is not specified.
<form onSubmit={ ( event ) => event.preventDefault() }>
<BlockInspector />
</form>,
inspector.contentContainer[ 0 ]
) }
</SidebarEditorProvider>

<__experimentalBlockSettingsMenuFirstItem>
{ ( { onClose } ) => (
Expand Down

0 comments on commit e32c704

Please sign in to comment.