Make WordPress Core

Ticket #48562: 48562.3.diff

File 48562.3.diff, 469 bytes (added by Mista-Flo, 4 years ago)

Better fix

  • src/js/media/views/modal.js

    diff --git a/src/js/media/views/modal.js b/src/js/media/views/modal.js
    index f7afb014b9..3804b18feb 100644
    a b Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{ 
    132132                        return this;
    133133                }
    134134
     135                // Pause current audio/video even after closing the modal
     136                $( '.mejs-pause button' ).click();
     137
    135138                // Enable page scrolling.
    136139                $( 'body' ).removeClass( 'modal-open' );
    137140