editor: focus editor on press enter on mobile

This commit is contained in:
Ammar Ahmed
2023-09-22 17:32:01 +05:00
parent 023347da3f
commit e8b1bb649c

View File

@@ -115,6 +115,13 @@ function Title({
onInput={() => {
resizeTextarea();
}}
onKeyDown={(e) => {
if (e.key === "Enter") {
e.preventDefault();
e.stopPropagation();
editor?.commands.focus();
}
}}
onPaste={() => {
resizeTextarea();
}}