From c5a5fdd7c621d1a1e3acb6dfa1282dc599fae806 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Mon, 26 Feb 2024 14:02:05 +0100 Subject: [PATCH] feat: scroll the note marker to the center automatically --- packages/client/internals/NoteDisplay.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/client/internals/NoteDisplay.vue b/packages/client/internals/NoteDisplay.vue index 0cad3396be..8d0e09b09f 100644 --- a/packages/client/internals/NoteDisplay.vue +++ b/packages/client/internals/NoteDisplay.vue @@ -96,6 +96,9 @@ function highlightNote() { e.stopPropagation() e.stopImmediatePropagation() }) + + if (clicks === current) + marker.scrollIntoView({ block: 'center', behavior: 'smooth' }) } }