WordPress.org

Make WordPress Core

Ticket #48562: 48562.1.patch

File 48562.1.patch, 733 bytes (added by Mista-Flo, 13 months ago)
  • src/js/media/views/frame/edit-attachments.js

    diff --git a/src/js/media/views/frame/edit-attachments.js b/src/js/media/views/frame/edit-attachments.js
    index a2e1749dc1..3eddd89316 100644
    a b EditAttachments = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.EditAtta 
    9191
    9292                        // Completely destroy the modal DOM element when closing it.
    9393                        this.modal.on( 'close', _.bind( function() {
     94                                // Fix: Stop playing the current audio/video even after closing the modal
     95                                this.trigger( 'refresh', this.model );
     96
    9497                                // Remove the keydown event.
    9598                                $( 'body' ).off( 'keydown.media-modal' );
    9699                                // Move focus back to the original item in the grid if possible.