From 9b44f640925ad2af8bafd5fd041cc0d75fa07e5f Mon Sep 17 00:00:00 2001 From: tianma-if Date: Wed, 29 Jul 2026 11:35:21 +0800 Subject: [PATCH] fix: keep newly created memo selected --- apps/web/src/components/EditorPane.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/src/components/EditorPane.tsx b/apps/web/src/components/EditorPane.tsx index ac2d74cc..9eda1ed8 100644 --- a/apps/web/src/components/EditorPane.tsx +++ b/apps/web/src/components/EditorPane.tsx @@ -1290,11 +1290,11 @@ const RichEditorPane = ({ if (!isMobileViewport) { if (isEditorReady(currentEditor) && hydratedMemoIdRef.current === memo.id) { currentEditor.commands.focus("end"); - onMobileDefaultEditConsumed(); // Consuming the create request updates the parent and can - // briefly blur the editor during that rerender. Restore the - // caret after the update has committed so a new note is - // immediately ready for typing. + // briefly blur the editor during that rerender. Mobile + // standalone editing consumes the request above; desktop + // keeps it alive until the list has observed the new memo so + // a background refresh cannot select the previous memo. window.setTimeout(() => { if (cancelled || memoRef.current?.id !== memo.id) { return;