From 95cf17e01892a2de71bf38ac3f78d85c2781695e Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 24 Jan 2026 20:50:50 +0000 Subject: [PATCH] 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`. --- js/ui/components/EmbedVideoModal.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/js/ui/components/EmbedVideoModal.js b/js/ui/components/EmbedVideoModal.js index 0f3474be..54e5ab8e 100644 --- a/js/ui/components/EmbedVideoModal.js +++ b/js/ui/components/EmbedVideoModal.js @@ -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) {