Skip to content

Commit

Permalink
Buttons block: use new Popover anchor prop (#43785)
Browse files Browse the repository at this point in the history
* Buttons block: use new `anchor` prop for `Popover`

* Prevent anchor value from being `null`
  • Loading branch information
ciampo committed Sep 14, 2022
1 parent 2c131e6 commit 3d53c18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/block-library/src/button/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ function ButtonEdit( props ) {
setIsEditingURL( false );
richTextRef.current?.focus();
} }
anchorRef={ ref?.current }
// `anchor` should never be `null`
anchor={ ref.current ?? undefined }
focusOnMount={ isEditingURL ? 'firstElement' : false }
__unstableSlotName={ '__unstable-block-tools-after' }
shift
Expand Down

0 comments on commit 3d53c18

Please sign in to comment.