fix: #2 use shift+enter to wrap lines when submit key is enter

This commit is contained in:
Yifei Zhang
2023-03-23 03:38:40 +00:00
parent eb531d4524
commit 547ef5565e
2 changed files with 10 additions and 3 deletions

View File

@@ -129,7 +129,10 @@ function useSubmitHandler() {
(config.submitKey === SubmitKey.AltEnter && e.altKey) ||
(config.submitKey === SubmitKey.CtrlEnter && e.ctrlKey) ||
(config.submitKey === SubmitKey.ShiftEnter && e.shiftKey) ||
config.submitKey === SubmitKey.Enter
(config.submitKey === SubmitKey.Enter &&
!e.altKey &&
!e.ctrlKey &&
!e.shiftKey)
);
};