Skip to content

Commit 490a4db

Browse files
committed
Fixed bug in embed video component
1 parent 0e2ea3e commit 490a4db

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

libs/builder/components-bootstrap5.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,8 +816,6 @@ Vvveb.Components.extend("_base", "html/gridrow", {
816816
if (value) _class += ' ' + input.name + '-' + value;
817817
column.setAttribute("class", _class);
818818

819-
//console.log(this, node, value, input, input.name);
820-
821819
return node;
822820
},
823821
});

libs/builder/components-widgets.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ Vvveb.Components.extend("_base", "widgets/embed-video", {
189189
document.querySelector(".component-properties [data-key=poster]").style.display = "none";
190190

191191
//check if html5
192-
if (video.length) {
192+
if (video) {
193193
this.url = video.src;
194-
} else if (iframe.length) {//vimeo or youtube
194+
} else if (iframe) {//vimeo or youtube
195195
let src = iframe.getAttribute("src");
196196
let match;
197197

@@ -241,7 +241,7 @@ Vvveb.Components.extend("_base", "widgets/embed-video", {
241241
break;
242242
}
243243

244-
node.querySelector("> iframe, > video").replaceWith(newnode);
244+
node.querySelector(":scope > iframe,:scope > video").replaceWith(newnode);
245245
return node;
246246
}
247247

0 commit comments

Comments
 (0)