From 731d84faaa1ad42fe2db3ab72c2c4265d36d2d55 Mon Sep 17 00:00:00 2001 From: uakci Date: Mon, 11 Sep 2023 18:02:14 +0200 Subject: [PATCH] composer: inhibit Cmd-Enter from inputting newline (#1421) --- src/view/com/composer/text-input/TextInput.web.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/view/com/composer/text-input/TextInput.web.tsx b/src/view/com/composer/text-input/TextInput.web.tsx index e9029881..7eea904a 100644 --- a/src/view/com/composer/text-input/TextInput.web.tsx +++ b/src/view/com/composer/text-input/TextInput.web.tsx @@ -103,6 +103,7 @@ export const TextInput = React.forwardRef(function TextInputImpl( handleKeyDown: (_, event) => { if ((event.metaKey || event.ctrlKey) && event.code === 'Enter') { textInputWebEmitter.emit('publish') + return true } }, },