If a YouTube video is embedded in a popup the video continues to play and the user can hear the audio even after closing the popup.

To fix this I added this line below line 35 of popup.js:

$('#popup-message-content').empty().remove();

So the function now looks like this:

function popup_message_disable_popup() {
  // Disables popup only if it is enabled.
  if (popupStatus == 1) {
    $("#popup-message-background").fadeOut("slow");
    $("#popup-message-window").fadeOut("slow");
    $('#popup-message-content').empty().remove();
    popupStatus = 0;
  }
}

If this looks okay, I recommend adding this to the module.

Comments

grzegorz.bartman’s picture

Status: Active » Fixed

Commited, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

rewording to make more sense