mefechoel / svelte-navigator

Simple, accessible routing for Svelte
Other
504 stars 39 forks source link

Focus Issue: Focus is on first H1 with black border #48

Closed matthiaslischka closed 2 years ago

matthiaslischka commented 2 years ago

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

matthiaslischka commented 2 years ago

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. 🤷‍♂️