diff --git a/apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx b/apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx index c1db575de4cf..00d9c66a2046 100644 --- a/apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx +++ b/apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx @@ -14,13 +14,7 @@ import { } from '@rocket.chat/ui-composer'; import { useTranslation, useUserPreference, useLayout, useSetting } from '@rocket.chat/ui-contexts'; import { useMutation } from '@tanstack/react-query'; -import type { - ReactElement, - MouseEventHandler, - FormEvent, - ClipboardEventHandler, - MouseEvent, -} from 'react'; +import type { ReactElement, MouseEventHandler, FormEvent, ClipboardEventHandler, MouseEvent } from 'react'; import React, { memo, useRef, useReducer, useCallback } from 'react'; import { Trans } from 'react-i18next'; import { useSubscription } from 'use-subscription'; @@ -58,11 +52,7 @@ const reducer = (_: unknown, event: FormEvent): boolean => { return Boolean(target.value.trim()); }; -const handleFormattingShortcut = ( - event: KeyboardEvent, - formattingButtons: FormattingButton[], - composer: ComposerAPI, -) => { +const handleFormattingShortcut = (event: KeyboardEvent, formattingButtons: FormattingButton[], composer: ComposerAPI) => { const isMacOS = navigator.platform.indexOf('Mac') !== -1; const isCmdOrCtrlPressed = (isMacOS && event.metaKey) || (!isMacOS && event.ctrlKey); @@ -362,7 +352,6 @@ const MessageBox = ({ } node.addEventListener('keydown', (e: KeyboardEvent) => { handler(e); - return; }); }, [handler],