Skip to content

Commit

Permalink
Merge pull request #1784 from WordPress/fix/demo-image-modal
Browse files Browse the repository at this point in the history
Remove MediaUploadButton autoOpen prop
  • Loading branch information
aduth authored Jul 7, 2017
2 parents 4dc462c + 7bfe862 commit 02538e0
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion blocks/library/cover-image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ registerBlockType( 'core/cover-image', {
buttonProps={ uploadButtonProps }
onSelect={ onSelectImage }
type="image"
autoOpen
>
{ __( 'Insert from Media Library' ) }
</MediaUploadButton>
Expand Down
1 change: 0 additions & 1 deletion blocks/library/gallery/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ registerBlockType( 'core/gallery', {
buttonProps={ uploadButtonProps }
onSelect={ setMediaUrl }
type="image"
autoOpen
multiple="true"
>
{ __( 'Insert from Media Library' ) }
Expand Down
1 change: 0 additions & 1 deletion blocks/library/image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ registerBlockType( 'core/image', {
buttonProps={ uploadButtonProps }
onSelect={ onSelectImage }
type="image"
autoOpen
>
{ __( 'Insert from Media Library' ) }
</MediaUploadButton>
Expand Down
6 changes: 0 additions & 6 deletions blocks/media-upload-button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ class MediaUploadButton extends Component {
this.frame.on( 'open', this.onOpen );
}

componentDidMount() {
if ( !! this.props.autoOpen ) {
setTimeout( () => this.frame.open() );
}
}

componentWillUnmount() {
this.frame.remove();
}
Expand Down

0 comments on commit 02538e0

Please sign in to comment.