Skip to content

Commit

Permalink
Block Bindings: Fix button popover not showing in patterns (#58219)
Browse files Browse the repository at this point in the history
* Use `lockUrlControls` variable in button

* Add `linkTarget` to JS allowed blocks object
  • Loading branch information
SantosGuillamot authored Jan 24, 2024
1 parent 5b4c751 commit 0c216f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/block-editor/src/hooks/use-bindings-attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const BLOCK_BINDINGS_ALLOWED_BLOCKS = {
'core/paragraph': [ 'content' ],
'core/heading': [ 'content' ],
'core/image': [ 'url', 'title', 'alt' ],
'core/button': [ 'url', 'text' ],
'core/button': [ 'url', 'text', 'linkTarget' ],
};

const createEditFunctionWithBindingsAttribute = () =>
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/button/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ function ButtonEdit( props ) {
{ isLinkTag &&
isSelected &&
( isEditingURL || isURLSet ) &&
! metadata?.bindings?.url && (
! lockUrlControls && (
<Popover
placement="bottom"
onClose={ () => {
Expand Down

0 comments on commit 0c216f1

Please sign in to comment.