From cc2f28a79800c5f9d6d1bb2fe6e5060baa0a4047 Mon Sep 17 00:00:00 2001 From: edidealt Date: Fri, 20 Mar 2026 20:51:05 +0000 Subject: [PATCH] fix track right clicks --- js/events.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/events.js b/js/events.js index dcd9b2f..5103f43 100644 --- a/js/events.js +++ b/js/events.js @@ -1317,12 +1317,14 @@ export async function handleTrackAction( showNotification('Link copied to clipboard!'); }); } else if (action === 'open-in-new-tab') { - // Use stored href from card if available, otherwise construct URL + // Use stored href from card if available and not a track, otherwise construct URL const contextMenu = document.getElementById('context-menu'); const storedHref = contextMenu?._contextHref; - const url = storedHref - ? `${window.location.origin}${storedHref}` - : `${window.location.origin}/track/${item.id || item.uuid}`; + const contextType = contextMenu?._contextType; + const url = + storedHref && contextType !== 'track' + ? `${window.location.origin}${storedHref}` + : `${window.location.origin}/track/${item.id || item.uuid}`; trackOpenInNewTab(type, item.id || item.uuid); window.open(url, '_blank');