fix track right clicks
This commit is contained in:
parent
98b65509ea
commit
cc2f28a798
1 changed files with 6 additions and 4 deletions
10
js/events.js
10
js/events.js
|
|
@ -1317,12 +1317,14 @@ export async function handleTrackAction(
|
||||||
showNotification('Link copied to clipboard!');
|
showNotification('Link copied to clipboard!');
|
||||||
});
|
});
|
||||||
} else if (action === 'open-in-new-tab') {
|
} 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 contextMenu = document.getElementById('context-menu');
|
||||||
const storedHref = contextMenu?._contextHref;
|
const storedHref = contextMenu?._contextHref;
|
||||||
const url = storedHref
|
const contextType = contextMenu?._contextType;
|
||||||
? `${window.location.origin}${storedHref}`
|
const url =
|
||||||
: `${window.location.origin}/track/${item.id || item.uuid}`;
|
storedHref && contextType !== 'track'
|
||||||
|
? `${window.location.origin}${storedHref}`
|
||||||
|
: `${window.location.origin}/track/${item.id || item.uuid}`;
|
||||||
|
|
||||||
trackOpenInNewTab(type, item.id || item.uuid);
|
trackOpenInNewTab(type, item.id || item.uuid);
|
||||||
window.open(url, '_blank');
|
window.open(url, '_blank');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue