[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:
@@ -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 (
|
||||||
|
|||||||
Reference in New Issue
Block a user