From e8b1bb649c0f69d310588e4e623ae9ea360dc070 Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Fri, 22 Sep 2023 17:32:01 +0500 Subject: [PATCH] editor: focus editor on press enter on mobile --- packages/editor-mobile/src/components/title.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/editor-mobile/src/components/title.tsx b/packages/editor-mobile/src/components/title.tsx index 3aa4fbac9..dbbcb78fe 100644 --- a/packages/editor-mobile/src/components/title.tsx +++ b/packages/editor-mobile/src/components/title.tsx @@ -115,6 +115,13 @@ function Title({ onInput={() => { resizeTextarea(); }} + onKeyDown={(e) => { + if (e.key === "Enter") { + e.preventDefault(); + e.stopPropagation(); + editor?.commands.focus(); + } + }} onPaste={() => { resizeTextarea(); }}