Skip to content

Commit

Permalink
Fix position of the link popover
Browse files Browse the repository at this point in the history
  • Loading branch information
david-szabo97 committed Dec 1, 2020
1 parent 5056694 commit 9a2eb5b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/block-library/src/button/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ function URLPicker( {
setAttributes,
opensInNewTab,
onToggleOpenInNewTab,
anchorRef,
} ) {
const [ isURLPickerOpen, setIsURLPickerOpen ] = useState( false );
const urlIsSet = !! url;
Expand All @@ -127,6 +128,7 @@ function URLPicker( {
<Popover
position="bottom center"
onClose={ () => setIsURLPickerOpen( false ) }
anchorRef={ anchorRef?.current }
>
<LinkControl
className="wp-block-navigation-link__inline-link-input"
Expand Down Expand Up @@ -276,6 +278,7 @@ function ButtonEdit( props ) {
isSelected={ isSelected }
opensInNewTab={ linkTarget === '_blank' }
onToggleOpenInNewTab={ onToggleOpenInNewTab }
anchorRef={ blockProps.ref }
/>
<InspectorControls>
<BorderPanel
Expand Down

0 comments on commit 9a2eb5b

Please sign in to comment.