diff --git a/jam-ui/src/components/common/WindowPortal.js b/jam-ui/src/components/common/WindowPortal.js index 8ed02f2b6..dc113ba73 100644 --- a/jam-ui/src/components/common/WindowPortal.js +++ b/jam-ui/src/components/common/WindowPortal.js @@ -68,6 +68,21 @@ const WindowPortal = ({ newWindow.document.body.style.backgroundColor = '#f8f9fa'; newWindow.document.body.style.overflow = 'hidden'; + // Copy all stylesheets from parent window to popup + const stylesheets = Array.from(document.querySelectorAll('link[rel="stylesheet"], style')); + stylesheets.forEach(sheet => { + if (sheet.tagName === 'LINK') { + const newLink = newWindow.document.createElement('link'); + newLink.rel = 'stylesheet'; + newLink.href = sheet.href; + newWindow.document.head.appendChild(newLink); + } else if (sheet.tagName === 'STYLE') { + const newStyle = newWindow.document.createElement('style'); + newStyle.textContent = sheet.textContent; + newWindow.document.head.appendChild(newStyle); + } + }); + // Add window ID for identification if (windowId) { newWindow.windowId = windowId;