fix: scroll to stacked note on title click

- Pass didrkey (with colons) instead of classNameId to scrollToFocusedNote in StackedPublicNote, so findIndex matches the URL-stored ID
- Revert includes() to strict === in findIndex for semantic correctness
This commit is contained in:
Julien Calixte
2026-03-16 18:49:21 +01:00
parent cfe5426421
commit 330bc5b41d
2 changed files with 2 additions and 2 deletions

View File

@@ -85,7 +85,7 @@ watch(
> >
<a <a
class="title-stacked-note-link" class="title-stacked-note-link"
@click.prevent="scrollToFocusedNote(classNameId)" @click.prevent="scrollToFocusedNote(didrkey)"
> >
<div <div
class="title-stacked-note breadcrumbs text-sm" class="title-stacked-note breadcrumbs text-sm"

View File

@@ -25,7 +25,7 @@ export const useRouteQueryStackedNotes = () => {
notes: string[] = stackedNotes.value, notes: string[] = stackedNotes.value,
) => { ) => {
nextTick(() => { nextTick(() => {
const index = noteId ? notes.findIndex((nid) => nid.includes(noteId)) : 0 const index = noteId ? notes.findIndex((nid) => nid === noteId) : 0
if (isMobile.value) { if (isMobile.value) {
if (noteId) { if (noteId) {