Pro 5.0.5 - Video Inside Modal Not Working (Closes When Video is Played)

Hey @alexander,

https://broughton2021.maratodev.co.uk/product/97212-ridgid-15-stainless-steel-tubing-cutter/

Once I click on the play button to play the video the modal closes with the video playing, so when i open the modal again I can see the video playing.

I’ve also tried using a different modal (off-canvas) and not use the video element but the raw element with an iframe of the youtube video, and it does exactly the same thing. Closes the modal the moment I hit play.

Hi @Maratopia_Digital,

Thanks! I’ve checked it out and it looks like an issue with the Asset Cleanup plugin you’re running. It overrides the WordPress oEmbed functionality with something else. It looks like it’s trying to lazy load the videos. Here’s how the modal element is designed to behave:

  • When the modal is open, it watches for any clicks
  • If a click originates inside the modal content area, it is ignored
  • If a click originates outside the modal content area (including the close button) it will close the modal.

What I suspect is happening is they trigger some kind of synthetic click to start the video and our toggle script can’t determine where it came from.

Unfortunately this isn’t something we can support, so you may just want to disable that functionality or reach out to their developers to see if there’s any ideas they have.