Skip to content

Commit

Permalink
Remove open in new tab from link preview
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryj committed Feb 7, 2024
1 parent bc3f367 commit 8d3385d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
19 changes: 0 additions & 19 deletions packages/block-editor/src/components/link-control/index.js
Expand Up @@ -427,25 +427,6 @@ function LinkControl( {
onEditClick={ () => setIsEditingLink( true ) }
hasRichPreviews={ hasRichPreviews }
hasUnlinkControl={ shownUnlinkControl }
additionalControls={ () => {
// Expose the "Opens in new tab" settings in the preview
// as it is the most common setting to change.
if (
settings?.find(
( setting ) => setting.id === 'opensInNewTab'
)
) {
return (
<LinkSettings
value={ internalControlValue }
settings={ settings?.filter(
( { id } ) => id === 'opensInNewTab'
) }
onChange={ onChange }
/>
);
}
} }
onRemove={ () => {
onRemove();
setIsEditingLink( true );
Expand Down
Expand Up @@ -32,7 +32,6 @@ export default function LinkPreview( {
hasRichPreviews = false,
hasUnlinkControl = false,
onRemove,
additionalControls,
} ) {
// Avoid fetching if rich previews are not desired.
const showRichPreviews = hasRichPreviews ? value?.url : null;
Expand Down Expand Up @@ -149,7 +148,6 @@ export default function LinkPreview( {
/>
<ViewerSlot fillProps={ value } />
</div>
{ additionalControls && additionalControls() }
</div>
);
}

0 comments on commit 8d3385d

Please sign in to comment.