diff --git a/addons/website/static/src/js/content/snippets.animation.js b/addons/website/static/src/js/content/snippets.animation.js index 2aa3b87c268..7ddac887fcf 100644 --- a/addons/website/static/src/js/content/snippets.animation.js +++ b/addons/website/static/src/js/content/snippets.animation.js @@ -686,7 +686,10 @@ registry.mediaVideo = publicWidget.Widget.extend(MobileYoutubeAutoplayMixin, { iframeEl = this._generateIframe(); } - if (!iframeEl) { + // We don't want to cause an error that would prevent entering edit mode + // if there is an iframe that doesn't have a src (this was possible for + // a while with the media dialog). + if (!iframeEl || !iframeEl.getAttribute('src')) { // Something went wrong: no iframe is present in the DOM and the // widget was unable to create one on the fly. return Promise.all(proms);