Skip to content

Build your personal knowledge base with Trilium Notes

style(modal): move the script modal host's display to CSS

Elian Doranbfb26a444e13
diff --git a/apps/client/src/widgets/react/Modal.css b/apps/client/src/widgets/react/Modal.css
index 7232bce291..cec3186d65 100644
--- a/apps/client/src/widgets/react/Modal.css
+++ b/apps/client/src/widgets/react/Modal.css
@@ -16,3 +16,7 @@
flex-direction: column;
min-height: 0;
}
+
+.script-modal-host {
+ display: contents;
+}
diff --git a/apps/client/src/widgets/react/Modal.tsx b/apps/client/src/widgets/react/Modal.tsx
index 6a677ba12e..ce84ae6b58 100644
--- a/apps/client/src/widgets/react/Modal.tsx
+++ b/apps/client/src/widgets/react/Modal.tsx
@@ -336,7 +336,7 @@ export function ScriptModal(props: ModalProps) {
return <>
<template ref={setOrigin} />
{origin && createPortal(
- <div className={isRenderNote ? RENDER_SCOPE_CLASS : undefined} data-ntx-id={ntxId} style={{ display: "contents" }}>
+ <div className={clsx("script-modal-host", isRenderNote && RENDER_SCOPE_CLASS)} data-ntx-id={ntxId}>
<Modal {...props} />
</div>,
document.body