Skip to content

Commit

Permalink
Tick in afterNavigate
Browse files Browse the repository at this point in the history
  • Loading branch information
h00s committed May 4, 2024
1 parent 4078323 commit a849450
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/lib/components/Link.svelte
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<script>
import { createLink } from '$lib/repositories/links'
import { urlByShortId, urlWithoutProtocol } from '$lib/helpers/link'
import { onMount } from 'svelte'
import { onMount, tick } from 'svelte'
import { afterNavigate } from '$app/navigation';
import { fade } from 'svelte/transition'
onMount(() => {
displayedOptions = false;
});
afterNavigate(() => {
afterNavigate(async () => {
await tick();
inputUrl.focus();
});
Expand Down

0 comments on commit a849450

Please sign in to comment.