fix: add show context for long threads, close #215
This commit is contained in:
1 parent
2e4bfd8912
commit
a548ab145c
4 files changed
+41
-7
No files matched your search
@@ -16,6 +16,7 @@
|
||||
import { toast } from 'mono-svelte'
|
||||
import { profile } from '$lib/auth.js'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { afterNavigate } from '$app/navigation'
|
||||
|
||||
export let nodes: CommentNodeI[]
|
||||
export let isParent: boolean
|
||||
@@ -25,6 +26,8 @@
|
||||
|
||||
onMount(() => {
|
||||
hydrated = true
|
||||
})
|
||||
afterNavigate(() => {
|
||||
if (isParent && $page.url.hash) {
|
||||
document.getElementById($page.url.hash)?.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
|
||||
Reference in new issue
Block a user