Fixed the scrollIntoView() position

This commit is contained in:
Simon Cambier
2024-01-05 20:59:38 +01:00
parent c5efa2ec90
commit 2ef38bdf26
3 changed files with 6 additions and 6 deletions

View File

@@ -4,12 +4,9 @@ import { stringsToRegex } from './text-processing'
export async function openNote(
item: ResultNote,
offset = 0,
newPane = false
): Promise<void> {
const reg = stringsToRegex(item.foundWords)
reg.exec(item.content)
const offset = reg.lastIndex
// Check if the note is already open,
// to avoid opening it twice if the first one is pinned
let alreadyOpenAndPinned = false