Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(attachments): viewing OCR content not working due to z-index issues
Elian Dorana759ced74ffc
diff --git a/apps/client/src/widgets/type_widgets/Attachment.tsx b/apps/client/src/widgets/type_widgets/Attachment.tsxindex 26694049bd..685242887b 100644--- a/apps/client/src/widgets/type_widgets/Attachment.tsx+++ b/apps/client/src/widgets/type_widgets/Attachment.tsx@@ -2,6 +2,7 @@ import "./Attachment.css";import { ConvertAttachmentToNoteResponse } from "@triliumnext/commons";import { t } from "i18next";+import { createPortal } from "preact/compat";import { useContext, useEffect, useRef, useState } from "preact/hooks";import appContext from "../../components/app_context";@@ -223,7 +224,7 @@ function AttachmentInfo({ attachment, isFullDetail }: { attachment: FAttachment,<div ref={contentWrapper} className="attachment-content-wrapper" /></div>- {supportsOcr && (+ {supportsOcr && createPortal(<ModalclassName="ocr-text-modal"title={t("ocr.extracted_text_title")}@@ -236,7 +237,8 @@ function AttachmentInfo({ attachment, isFullDetail }: { attachment: FAttachment,textUrl={`ocr/attachments/${attachment.attachmentId}/text`}processUrl={`ocr/process-attachment/${attachment.attachmentId}`}/>- </Modal>+ </Modal>,+ document.body)}</div>);