From ac835c76aa39b2a03d713237ce870160099fcbcf Mon Sep 17 00:00:00 2001 From: ayangweb <75017711+ayangweb@users.noreply.github.com> Date: Wed, 23 Jul 2025 16:20:46 +0800 Subject: [PATCH] fix: fix shortcut issue in windows context menu (#804) * fix: fix shortcut issue in windows context menu * docs: update changelog --- docs/content.en/docs/release-notes/_index.md | 1 + src/components/Search/ContextMenu.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/content.en/docs/release-notes/_index.md b/docs/content.en/docs/release-notes/_index.md index affbb94b..c16a48db 100644 --- a/docs/content.en/docs/release-notes/_index.md +++ b/docs/content.en/docs/release-notes/_index.md @@ -34,6 +34,7 @@ Information about release notes of Coco Server is provided here. - fix: increase read_timeout for HTTP streaming stability #798 - fix: enter key problem #794 - fix: fix selection issue after renaming #800 +- fix: fix shortcut issue in windows context menu #804 ### ✈️ Improvements diff --git a/src/components/Search/ContextMenu.tsx b/src/components/Search/ContextMenu.tsx index 1822f1d0..3ff3723a 100644 --- a/src/components/Search/ContextMenu.tsx +++ b/src/components/Search/ContextMenu.tsx @@ -142,7 +142,9 @@ const ContextMenu = ({ formatUrl }: ContextMenuProps) => { type === "AI Assistant" || id === "Extension Store", clickEvent() { - copyToClipboard(formatUrl && formatUrl(selectedSearchContent) || url); + copyToClipboard( + (formatUrl && formatUrl(selectedSearchContent)) || url + ); }, }, { @@ -169,7 +171,7 @@ const ContextMenu = ({ formatUrl }: ContextMenuProps) => { name: t("search.contextMenu.copyQuestionAndAnswer"), icon: , keys: isMac ? ["⌘", "L"] : ["Ctrl", "L"], - shortcut: isMac ? "meta.l" : "ctrl+l", + shortcut: isMac ? "meta.l" : "ctrl.l", hide: category !== "Calculator", clickEvent() { copyToClipboard(`${query.value} = ${result.value}`);