diff --git a/src/components/Chat/ChatContent/Message/View/EditView.tsx b/src/components/Chat/ChatContent/Message/View/EditView.tsx index 3427923..9b91791 100644 --- a/src/components/Chat/ChatContent/Message/View/EditView.tsx +++ b/src/components/Chat/ChatContent/Message/View/EditView.tsx @@ -43,21 +43,22 @@ const EditView = ({ if (e.key === 'Enter' && !isMobile && !e.nativeEvent.isComposing) { const enterToSubmit = useStore.getState().enterToSubmit; - if (sticky) { - if ( - (enterToSubmit && !e.shiftKey) || - (!enterToSubmit && (e.ctrlKey || e.shiftKey)) - ) { + + if (e.ctrlKey && e.shiftKey) { + e.preventDefault(); + handleSaveAndSubmit(); + resetTextAreaHeight(); + } else if ( + (enterToSubmit && !e.shiftKey) || + (!enterToSubmit && (e.ctrlKey || e.shiftKey)) + ) { + if (sticky) { e.preventDefault(); handleSaveAndSubmit(); resetTextAreaHeight(); + } else { + handleSave(); } - } else { - if (e.ctrlKey && e.shiftKey) { - e.preventDefault(); - handleSaveAndSubmit(); - resetTextAreaHeight(); - } else if (e.ctrlKey || e.shiftKey) handleSave(); } } };