mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
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:
1 parent
0e5e6b6fd2
commit
95cf17e018
1 file changed
+8
-2
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user