mefechoel / svelte-navigator

Simple, accessible routing for Svelte

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Focus Issue: Focus is on first H1 with black border

matthiaslischka opened this issue · comments

I have this weird bug where as soon as I add svelte-navigator to my page the focus is messed up.

The focus is on the first H1 which gets an ugly black border. Even an input with autofocus or onMount(() => myInput.focus()); won't take away the focus...

image
Reproduce here: https://svelte.dev/repl/5c7cd0c49b2f47ac8532ab87e745cd95

I'm just wondering if I do something wrong here.

BR Matthias

Closed. Sry. Duplicate of #10
I still think that the autofocus or onMount(() => myInput.focus()); should win over the navigator focus management.
But I just add primary={false} to my route for now. Sry again. I don't know why I did not find this issue before. I did look at the closed ones. 🤷‍♂️