From 1a01f75d35abb4aa02edee22e1e5640d3f0aa27c Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 8 Feb 2026 03:05:34 +0000 Subject: fix(extension): dont store tab title when saving links or images. fixes #2462 --- apps/browser-extension/src/background/background.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/browser-extension/src/background/background.ts b/apps/browser-extension/src/background/background.ts index 04089cc8..0acaa919 100644 --- a/apps/browser-extension/src/background/background.ts +++ b/apps/browser-extension/src/background/background.ts @@ -115,12 +115,16 @@ async function handleContextMenuClick( } else if (menuItemId === CLEAR_ALL_CACHE_ID) { await clearAllCache(); } else if (menuItemId === ADD_LINK_TO_KARAKEEP_ID) { + // Only pass the current page title when the URL being saved is the + // page itself. When saving a link or image, the title would + // incorrectly be the current page's title instead of the target's. + const isCurrentPage = !srcUrl && !linkUrl; addLinkToKarakeep({ selectionText, srcUrl, linkUrl, pageUrl, - title: tab?.title, + title: isCurrentPage ? tab?.title : undefined, }); // NOTE: Firefox only allows opening context menus if it's triggered by a user action. -- cgit v1.2.3-70-g09d2