diff --git a/files/assets/js/core.js b/files/assets/js/core.js index ee4791ec1..5ee5921a6 100644 --- a/files/assets/js/core.js +++ b/files/assets/js/core.js @@ -357,7 +357,7 @@ function prepare_to_pause(audio) { }); } - window.addEventListener('click', (e) => { + document.addEventListener('click', (e) => { if (e.target.tagName.toLowerCase() == "lite-youtube" && !audio.paused) audio.pause(); }); } diff --git a/files/assets/js/profile_song.js b/files/assets/js/profile_song.js index 3a3e2fa2c..9ed09a0de 100644 --- a/files/assets/js/profile_song.js +++ b/files/assets/js/profile_song.js @@ -19,7 +19,7 @@ if (u_username) } audio.play(); - window.addEventListener('click', () => { + document.addEventListener('click', () => { if (audio.paused) audio.play(); }, {once : true}); @@ -53,7 +53,7 @@ else if (!paused) { audio.play(); - window.addEventListener('click', () => { + document.addEventListener('click', () => { if (audio.paused) audio.play(); }, {once : true}); } diff --git a/files/templates/submission.html b/files/templates/submission.html index efb42d9ad..e6160ab88 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -455,7 +455,7 @@ audio.play(); if (audio.paused) { - window.addEventListener('click', () => { + document.addEventListener('click', () => { if (audio.paused) audio.play(); }, {once : true}) }