diff --git a/src/components/Editor/Article/Summary/index.tsx b/src/components/Editor/Article/Summary/index.tsx index b33f882635..755a6651e6 100644 --- a/src/components/Editor/Article/Summary/index.tsx +++ b/src/components/Editor/Article/Summary/index.tsx @@ -60,7 +60,10 @@ const EditorSummary: React.FC = ({ const handleKeyDown = (event: React.KeyboardEvent) => { const target = event.target as HTMLTextAreaElement - if (event.key.toLowerCase() === KEYVALUE.enter) { + if ( + event.key.toLowerCase() === KEYVALUE.enter && + !event.nativeEvent.isComposing + ) { event.preventDefault() if (target.selectionStart === target.value.length) { diff --git a/src/components/Editor/Article/Title/index.tsx b/src/components/Editor/Article/Title/index.tsx index ca5fa43e3b..4c4bde7da2 100644 --- a/src/components/Editor/Article/Title/index.tsx +++ b/src/components/Editor/Article/Title/index.tsx @@ -39,7 +39,10 @@ const EditorTitle: React.FC = ({ defaultValue = '', update }) => { const handleKeyDown = (event: React.KeyboardEvent) => { const target = event.target as HTMLTextAreaElement - if (event.key.toLowerCase() === KEYVALUE.enter) { + if ( + event.key.toLowerCase() === KEYVALUE.enter && + !event.nativeEvent.isComposing + ) { event.preventDefault() if (target.selectionStart === target.value.length) {