mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-08-29 10:09:26 +02:00
editor: fix editor not scrolling to selected search result
This commit is contained in:
@@ -478,8 +478,9 @@ export const SearchReplace = Extension.create<SearchOptions, SearchStorage>({
|
|||||||
if (!isSearchTransaction || !selectedResult) return;
|
if (!isSearchTransaction || !selectedResult) return;
|
||||||
|
|
||||||
const tr = newState.tr;
|
const tr = newState.tr;
|
||||||
|
|
||||||
|
scrollIntoView(this.editor.view, selectedResult.from);
|
||||||
if (expandCollapsedParents(tr, selectedResult.from)) {
|
if (expandCollapsedParents(tr, selectedResult.from)) {
|
||||||
scrollIntoView(this.editor.view, selectedResult.from);
|
|
||||||
return tr;
|
return tr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user