Ensure VideoModal applies design system mode

This commit is contained in:
thePR0M3TH3AN committed 2025-10-11 19:30:15 -04:00
1 parent e0140d35a0
commit d372a0a694
2 files changed
+63 -6

No files matched your search

+6
View File
@@ -1,5 +1,6 @@
import { createModalAccessibility } from "./modalAccessibility.js";
import positionFloatingPanel from "../utils/positionFloatingPanel.js";
import { applyDesignSystemAttributes } from "../../designSystem.js";
export class VideoModal {
constructor({
@@ -163,6 +164,9 @@ export class VideoModal {
const existing = this.document.getElementById("playerModal");
if (existing) {
if (this.playerModal === existing && this.loaded) {
return this.playerModal;
}
this.hydrate(existing);
this.loaded = true;
return this.playerModal;
@@ -194,6 +198,8 @@ export class VideoModal {
throw new Error("Player modal root not found in markup.");
}
applyDesignSystemAttributes(playerModal);
this.hydrate(playerModal);
this.loaded = true;
return this.playerModal;