diff --git a/src/lib/components/search/SearchResult.svelte b/src/lib/components/search/SearchResult.svelte index a7943a6..9931bbf 100644 --- a/src/lib/components/search/SearchResult.svelte +++ b/src/lib/components/search/SearchResult.svelte @@ -18,7 +18,10 @@ {href} target={isExternal ? '_blank' : undefined} rel={isExternal ? 'noopener noreferrer' : undefined} - onclick={onselect} + onclick={() => { + // Delay close so the browser follows the href first + setTimeout(() => onselect(), 0); + }} onmouseenter={onhover} class="flex items-center gap-3 rounded-md px-3 py-2.5 transition-colors {active ? 'search-active bg-primary/15 text-foreground' : 'hover:bg-accent'}"