diff --git a/apps/client/src/widgets/ribbon/BasicPropertiesTab.tsx b/apps/client/src/widgets/ribbon/BasicPropertiesTab.tsx index fcdd44082..9b8f690bf 100644 --- a/apps/client/src/widgets/ribbon/BasicPropertiesTab.tsx +++ b/apps/client/src/widgets/ribbon/BasicPropertiesTab.tsx @@ -22,6 +22,7 @@ import { CodeMimeTypesList } from "../type_widgets/options/code_notes"; import { ContentLanguagesList } from "../type_widgets/options/i18n"; import { LocaleSelector } from "../type_widgets/options/components/LocaleSelector"; import { isExperimentalFeatureEnabled } from "../../services/experimental_features"; +import { createPortal } from "preact/compat"; const isNewLayout = isExperimentalFeatureEnabled("new-layout"); @@ -348,18 +349,27 @@ export function NoteLanguageSelector({ note }: { note?: FNote | null }) { >{t("note_language.configure-languages")} )} /> - setModalShown(false)} - size="lg" scrollable - > - - + {createPortal( + , + document.body + )} ); } +function ContentLanguagesModal({ modalShown, setModalShown }: { modalShown: boolean, setModalShown: (shown: boolean) => void }) { + return ( + setModalShown(false)} + size="lg" scrollable + > + + + ); +} + function findTypeTitle(type?: NoteType, mime?: string | null) { if (type === "code") { const mimeTypes = mime_types.getMimeTypes();