diff --git a/packages/block-library/src/media-text/edit.js b/packages/block-library/src/media-text/edit.js index d229a5b300686c..e1a7c268ef0691 100644 --- a/packages/block-library/src/media-text/edit.js +++ b/packages/block-library/src/media-text/edit.js @@ -57,7 +57,6 @@ class MediaTextEdit extends Component { mediaWidth: null, }; this.onSetHref = this.onSetHref.bind( this ); - this.onSelectURL = this.onSelectURL.bind( this ); } onSelectMedia( media ) { @@ -118,29 +117,6 @@ class MediaTextEdit extends Component { this.props.setAttributes( props ); } - onSelectURL( newURL ) { - const { mediaUrl, linkDestination, href } = this.props.attributes; - - if ( newURL !== mediaUrl ) { - let newHref = href; - if ( linkDestination === LINK_DESTINATION_MEDIA ) { - // Update the media link. - newHref = newURL; - } - - // Check if the image is linked to the attachment page. - if ( linkDestination === LINK_DESTINATION_ATTACHMENT ) { - // Update the media link. - newHref = undefined; - } - this.props.setAttributes( { - mediaUrl: newURL, - href: newHref, - mediaId: undefined, - } ); - } - } - commitWidthChange( width ) { const { setAttributes } = this.props; @@ -159,7 +135,6 @@ class MediaTextEdit extends Component { );