From 786c6f672ee37eaa0f061cafbcd8d47c58da72c8 Mon Sep 17 00:00:00 2001 From: Steven Date: Thu, 5 Jun 2025 23:08:55 +0800 Subject: [PATCH] chore: remove prevent default for enter keydown --- web/src/components/MemoEditor/Editor/index.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/web/src/components/MemoEditor/Editor/index.tsx b/web/src/components/MemoEditor/Editor/index.tsx index dcf3890d9..ad941ddf1 100644 --- a/web/src/components/MemoEditor/Editor/index.tsx +++ b/web/src/components/MemoEditor/Editor/index.tsx @@ -206,11 +206,6 @@ const Editor = forwardRef(function Editor(props: Props, ref: React.ForwardedRef< } if (insertText) { - // Prevent a newline from being inserted, so that we can insert it manually later. - // This prevents a race condition that occurs between the newline insertion and - // inserting the insertText. - // Needs to be called before any async call. - event.preventDefault(); // Insert the text at the current cursor position. editorActions.insertText(insertText); }