MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / scrollToCommentElement

Function scrollToCommentElement

packages/app-core/src/components/VimNav.tsx:1810–1818  ·  view source on GitHub ↗
(
    el: HTMLElement | undefined,
    state: ReturnType<typeof useStore.getState>
  )

Source from the content-addressed store, hash-verified

1808 }
1809
1810 function scrollToCommentElement(
1811 el: HTMLElement | undefined,
1812 state: ReturnType<typeof useStore.getState>
1813 ): void {
1814 if (!el) return
1815 const commentId = el.dataset.commentId
1816 if (commentId) state.setActiveCommentId(commentId)
1817 el.scrollIntoView({ block: 'nearest' })
1818 }
1819
1820 function focusCommentsPanel(state: ReturnType<typeof useStore.getState>): void {
1821 const panel = document.querySelector<HTMLElement>('[data-comments-panel]')

Callers 2

handleCommentsKeyFunction · 0.85
focusCommentsPanelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected