fix(ui): unwrap embed modal content to resolve button interaction issues

Refactored `EmbedVideoModal.js` to unwrap the fetched HTML content using a `DocumentFragment` before appending it to the DOM. This removes an unnecessary wrapper `div` that was causing stacking context issues, preventing the modal's buttons (Exit, Close, Copy) from being clickable when layered over other UI elements. This change aligns the implementation with `VideoModal.js`.
This commit is contained in:
google-labs-jules[bot] committed 2026-01-24 20:50:50 +00:00
1 parent 0e5e6b6fd2
commit 95cf17e018
1 file changed
+8 -2
+8 -2
View File
@@ -98,8 +98,14 @@ export class EmbedVideoModal {
const wrapper = this.document.createElement("div");
wrapper.innerHTML = html;
this.removeTrackingScripts(wrapper);
this.container.appendChild(wrapper);
modal = wrapper.querySelector("#embedVideoModal");
const fragment = this.document.createDocumentFragment();
while (wrapper.firstChild) {
fragment.appendChild(wrapper.firstChild);
}
this.container.appendChild(fragment);
modal = this.container.querySelector("#embedVideoModal");
}
if (!modal) {