fix enter send message on macos

Signed-off-by: yongman <yming0221@gmail.com>
This commit is contained in:
yongman 2024-03-29 23:13:20 +08:00
parent c353ab3577
commit 183653b6a0

View File

@ -41,7 +41,7 @@ function ChatInput({
}}
placeholder={sender ? t("chat.placeholder-enter") : t("chat.placeholder")}
onKeyDown={async (e) => {
if (e.key === "Enter") {
if (e.key === "Enter" && e.keyCode != 229) {
if (sender) {
// on Enter, clear the input
// on Ctrl + Enter or Shift + Enter, keep the input