Skip to content
Merged
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
2 changes: 2 additions & 0 deletions packages/media-utils/src/components/media-upload/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ class MediaUpload extends Component {
if ( onClose ) {
onClose();
}

this.frame.detach();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should work, but it looks like the detach() method calls close as well, so you might be able to bind the 'close' event directly to detach similar to how the EditAttachments frame works: https://github.com/WordPress/wordpress-develop/blob/trunk/src/js/media/views/frame/edit-attachments.js#L68

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the difference between binding detach directly to the event vs calling it from the binded callback?

I think they will be the same in this code base.

}

updateCollection() {
Expand Down