Skip to content

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

web: fix flicker when programatically updating title

Abdullah Atta16cd92f03a72
diff --git a/apps/web/src/components/editor/title-box.tsx b/apps/web/src/components/editor/title-box.tsx
index 4fe47e2d9..968ce6a4d 100644
--- a/apps/web/src/components/editor/title-box.tsx
+++ b/apps/web/src/components/editor/title-box.tsx
@@ -62,7 +62,7 @@ function TitleBox(props: TitleBoxProps) {
withSelectionPersist(inputRef.current, (input) => {
input.value = title || "";
- requestAnimationFrame(() => resizeTextarea(input));
+ setTimeout(() => resizeTextarea(input));
});
}, [sessionType, id, sessionTitle]);