editor: scroll to top on note change

This commit is contained in:
ammarahm-ed
2023-04-01 17:28:40 +05:00
committed by Ammar Ahmed
parent ff84ee2d42
commit 509dc4b541

View File

@@ -119,6 +119,10 @@ const Tiptap = ({
const update = useCallback(() => {
setTick((tick) => tick + 1);
containerRef.current?.scrollTo?.({
left: 0,
top: 0
});
globalThis.editorController.setTitlePlaceholder("Note title");
}, []);