fix: stop double link open on url click

This commit is contained in:
DecafDev 2024-07-26 18:09:19 -06:00
parent d01ab2e086
commit c49162876f

View file

@ -119,11 +119,7 @@
});
function handleUrlClick(e: Event) {
const nativeEvent = e as MouseEvent;
nativeEvent.stopPropagation();
if (url != null) {
window.open(url, "_blank");
}
e.stopPropagation();
}
async function loadSocialImage(imageUrl: string | null) {
@ -260,6 +256,8 @@
><Icon iconId="link" size="xs" /><a
class="vault-explorer-grid-card__url"
href={url}
target="_blank"
rel="noopener"
on:click={handleUrlClick}>{getDomainFromUrl(url)}</a
></Stack
>