Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent link control popover from going offscreen #42389

Merged
merged 1 commit into from
Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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