mirror of
https://github.com/decaf-dev/obsidian-vault-explorer.git
synced 2026-07-22 10:10:31 +00:00
fix: stop double link open on url click
This commit is contained in:
parent
d01ab2e086
commit
c49162876f
1 changed files with 3 additions and 5 deletions
|
|
@ -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
|
||||
>
|
||||
|
|
|
|||
Loading…
Reference in a new issue