[bugfix] Main Page: Message Input Box. Fix 'show_and_disable_enter_key' behavior that was block everything and can't get arrow up and down key that history navigation feature.

This commit is contained in:
Sakamoto Shiina
2024-12-02 06:44:27 +09:00
parent 474ab3d4b4
commit 8429d9b122

View File

@@ -53,12 +53,6 @@ export const MessageInputBox = () => {
}; };
const onKeyDownFunction = (e) => { const onKeyDownFunction = (e) => {
if (currentSendMessageButtonType.data === "show_and_disable_enter_key") return;
if (e.keyCode === 13 && !e.shiftKey) {
onSubmitFunction(e);
}
if (e.key === "ArrowUp" && e.shiftKey) { if (e.key === "ArrowUp" && e.shiftKey) {
e.preventDefault(); e.preventDefault();
@@ -82,6 +76,13 @@ export const MessageInputBox = () => {
); );
} }
} }
if (currentSendMessageButtonType.data === "show_and_disable_enter_key") return;
if (e.keyCode === 13 && !e.shiftKey) {
onSubmitFunction(e);
}
}; };
return ( return (