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:
@@ -85,7 +85,7 @@ watch(
|
||||
>
|
||||
<a
|
||||
class="title-stacked-note-link"
|
||||
@click.prevent="scrollToFocusedNote(classNameId)"
|
||||
@click.prevent="scrollToFocusedNote(didrkey)"
|
||||
>
|
||||
<div
|
||||
class="title-stacked-note breadcrumbs text-sm"
|
||||
|
||||
@@ -25,7 +25,7 @@ export const useRouteQueryStackedNotes = () => {
|
||||
notes: string[] = stackedNotes.value,
|
||||
) => {
|
||||
nextTick(() => {
|
||||
const index = noteId ? notes.findIndex((nid) => nid.includes(noteId)) : 0
|
||||
const index = noteId ? notes.findIndex((nid) => nid === noteId) : 0
|
||||
|
||||
if (isMobile.value) {
|
||||
if (noteId) {
|
||||
|
||||
Reference in New Issue
Block a user