diff --git a/public/app/chatDrawer.js b/public/app/chatDrawer.js index 0cec46b..836f70b 100644 --- a/public/app/chatDrawer.js +++ b/public/app/chatDrawer.js @@ -12,6 +12,10 @@ const focusableSelector = [ "[tabindex]:not([tabindex='-1'])" ].join(","); +if (chatDrawer && chatDrawer.parentElement !== document.body) { + document.body.appendChild(chatDrawer); +} + function getFocusableElements() { if (!chatDrawer) return []; return Array.from(chatDrawer.querySelectorAll(focusableSelector)) diff --git a/scripts/lint.mjs b/scripts/lint.mjs index fcb2e28..15b09a9 100644 --- a/scripts/lint.mjs +++ b/scripts/lint.mjs @@ -22,6 +22,7 @@ const files = [ "src/services/personaService.js", "public/script.js", "public/app/api.js", + "public/app/chatDrawer.js", "public/app/constants.js", "public/app/dom.js" ];