diff --git a/src/components/messageSubmitInterface/messageSubmitInterfaceComponent.tsx b/src/components/messageSubmitInterface/messageSubmitInterfaceComponent.tsx index a87a56e68..33a5d4b96 100644 --- a/src/components/messageSubmitInterface/messageSubmitInterfaceComponent.tsx +++ b/src/components/messageSubmitInterface/messageSubmitInterfaceComponent.tsx @@ -412,23 +412,6 @@ export const MessageSubmitInterfaceComponent = ({ return getDefaultKeyBinding(event); }; - const handleEditorKeyCommand = useCallback( - (command) => { - const newState = RichUtils.handleKeyCommand(editorState, command); - if (command === 'shift-enter') { - handleButtonClick(); - return 'handled'; - } - - if (newState) { - handleEditorChange(newState); - return 'handled'; - } - return 'not-handled'; - }, - [editorState, handleEditorChange] - ); - const resizeTextarea = useCallback(() => { const textInput: any = textareaInputRef.current; // default values @@ -795,6 +778,23 @@ export const MessageSubmitInterfaceComponent = ({ userData ]); + const handleEditorKeyCommand = useCallback( + (command) => { + const newState = RichUtils.handleKeyCommand(editorState, command); + if (command === 'shift-enter') { + handleButtonClick(); + return 'handled'; + } + + if (newState) { + handleEditorChange(newState); + return 'handled'; + } + return 'not-handled'; + }, + [editorState, handleEditorChange, handleButtonClick] + ); + const handleRequestFeedbackCheckbox = useCallback(() => { setRequestFeedbackCheckboxChecked( (requestFeedbackCheckboxChecked) => !requestFeedbackCheckboxChecked