fix: delay search dialog close so link navigation fires first
This commit is contained in:
@@ -18,7 +18,10 @@
|
|||||||
{href}
|
{href}
|
||||||
target={isExternal ? '_blank' : undefined}
|
target={isExternal ? '_blank' : undefined}
|
||||||
rel={isExternal ? 'noopener noreferrer' : undefined}
|
rel={isExternal ? 'noopener noreferrer' : undefined}
|
||||||
onclick={onselect}
|
onclick={() => {
|
||||||
|
// Delay close so the browser follows the <a> href first
|
||||||
|
setTimeout(() => onselect(), 0);
|
||||||
|
}}
|
||||||
onmouseenter={onhover}
|
onmouseenter={onhover}
|
||||||
class="flex items-center gap-3 rounded-md px-3 py-2.5 transition-colors
|
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'}"
|
{active ? 'search-active bg-primary/15 text-foreground' : 'hover:bg-accent'}"
|
||||||
|
|||||||
Reference in New Issue
Block a user