Closed (fixed)
Project:
Modal
Version:
6.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Nov 2025 at 09:07 UTC
Updated:
16 Feb 2026 at 13:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
renatog commentedNice catch
Comment #3
renatog commentedI didn't spend so much time investigating yet, however I think there is no solution lol
I mean; the video runs inside of an iFrame
On this iFrame is an external website (youtube.com)
When the Modal is closed, our JS on Drupal won't be able to trigger the "stop button" inside of external site that runs inside of iFrame
Since it's a "separated website"
Just a guess for now, I didn't studied more about that yet, but if someone has ideas or suggestions, feel free to share here and we can read better
Comment #4
dhruv.mittal commentedWorking on it
Comment #5
renatog commentedAwesome!
Thank you so much @dhruvmittal
Comment #7
dhruv.mittal commentedI'm happy to help @renatog
Please review !!
Comment #8
renatog commentedNice catch to rest the
srcto stop the video inside of iFrame:D
Thanks a lot
Comment #9
renatog commentedComment #10
dhruv.mittal commentedOn it
Comment #11
dhruv.mittal commented@renatog thanks for your feedback. I've now removed the redundant code and created a separate file for handling the issue.
Please review and let me know if any assistance required further.
Thank you
Comment #12
renatog commentedIt was amazing!!
Drupal.modalPage.stopYouTubeVideos($(this));I'll test here, thanks a lot @dhruvmittal
Comment #13
renatog commentedTested on 6.0.x and worked fine after running cache rebuild
Comment #15
renatog commentedMoved to the dev branch
Thank you so much, team
Comment #17
renatog commentedReally appreciated!
Released at: https://www.drupal.org/project/modal_page/releases/6.0.0-beta11
Btw, I think we can move this fix to 5.1.x as well
Comment #18
dhruv.mittal commentedHello @renatog thank you very much for the appreciation.
But I think You forgot to assign credits.
Comment #19
renatog commented@dhruv.mittal thanks for letting me know
Credits has been applied
Comment #20
renatog commentedReported a separated ticket to apply this same solution at version 5.1.x:
#3570102: [5.1.x] YouTube video keeps playing after closing modal
Comment #21
dhruv.mittal commentedThanks @renatog
I'll love to work on the provided issue too
Comment #22
renatog commentedAwesome, thanks a lot!