Skip to content

Build your personal knowledge base with Trilium Notes

chore(react): fix configure languages open in background

Elian Doran3ec2947c4f8d
diff --git a/apps/client/src/widgets/react/FormList.tsx b/apps/client/src/widgets/react/FormList.tsx
index 37efafdf28..74f501b7b5 100644
--- a/apps/client/src/widgets/react/FormList.tsx
+++ b/apps/client/src/widgets/react/FormList.tsx
@@ -80,7 +80,7 @@ interface FormListItemOpts {
disabled?: boolean;
checked?: boolean | null;
selected?: boolean;
- onClick?: () => void;
+ onClick?: (e: MouseEvent) => void;
triggerCommand?: CommandNames;
description?: string;
className?: string;
diff --git a/apps/client/src/widgets/ribbon/BasicPropertiesTab.tsx b/apps/client/src/widgets/ribbon/BasicPropertiesTab.tsx
index 45d6d39995..243de2fc87 100644
--- a/apps/client/src/widgets/ribbon/BasicPropertiesTab.tsx
+++ b/apps/client/src/widgets/ribbon/BasicPropertiesTab.tsx
@@ -330,7 +330,10 @@ function NoteLanguageSwitch({ note }: { note?: FNote | null }) {
})}
<FormListItem
- onClick={() => appContext.tabManager.openContextWithNote("_optionsLocalization", { activate: true })}
+ onClick={(e) => {
+ e.stopPropagation();
+ appContext.tabManager.openContextWithNote("_optionsLocalization", { activate: true });
+ }}
>{t("note_language.configure-languages")}</FormListItem>
</Dropdown>