Skip to content

Commit

Permalink
Prevent link control popover from going offscreen by adding __unstabl…
Browse files Browse the repository at this point in the history
…eShift prop (#42389)
  • Loading branch information
talldan committed Jul 14, 2022
1 parent 6f149a2 commit e8b69d4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/block-library/src/button/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ function ButtonEdit( props ) {
anchorRef={ ref?.current }
focusOnMount={ isEditingURL ? 'firstElement' : false }
__unstableSlotName={ '__unstable-block-tools-after' }
__unstableShift
>
<LinkControl
className="wp-block-navigation-link__inline-link-input"
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ export default function NavigationLinkEdit( {
position="bottom center"
onClose={ () => setIsLinkOpen( false ) }
anchorRef={ listItemRef.current }
__unstableShift
>
<LinkControl
hasTextControl
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/navigation-submenu/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ export default function NavigationSubmenuEdit( {
position="bottom center"
onClose={ () => setIsLinkOpen( false ) }
anchorRef={ listItemRef.current }
__unstableShift
>
<LinkControl
className="wp-block-navigation-link__inline-link-input"
Expand Down
1 change: 1 addition & 0 deletions packages/format-library/src/link/inline.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ function InlineLinkUI( {
focusOnMount={ focusOnMount.current }
onClose={ stopAddingLink }
position="bottom center"
__unstableShift
>
<LinkControl
key={ forceRemountKey }
Expand Down

0 comments on commit e8b69d4

Please sign in to comment.