Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

editor: scroll to search result when opening already loaded note

kashaf-ansari-dev4c8413f21896
diff --git a/packages/editor-mobile/src/hooks/useEditorController.ts b/packages/editor-mobile/src/hooks/useEditorController.ts
index 33c4fc474..67e864fde 100644
--- a/packages/editor-mobile/src/hooks/useEditorController.ts
+++ b/packages/editor-mobile/src/hooks/useEditorController.ts
@@ -379,6 +379,9 @@ export function useEditorController({
case "native:html":
if (htmlContentRef.current === value.data) {
setLoading(false);
+ if (value.searchResultIndex !== undefined) {
+ scrollToSearchResult(value.searchResultIndex);
+ }
break;
}
htmlContentRef.current = value.data;