修复回车bug
This commit is contained in:
parent
b5a15d0750
commit
5d879e490f
@ -260,7 +260,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
});
|
||||
input.addEventListener("keydown", e => {
|
||||
if (e.key === "Enter") {
|
||||
log("按下回车键");
|
||||
e.preventDefault();
|
||||
triggerSearch();
|
||||
}
|
||||
});
|
||||
@ -301,8 +301,11 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
fetchLLMAnswer(val, llmResultContainer, llmResultContent);
|
||||
});
|
||||
|
||||
llmInput.addEventListener("keydown", (e) => {
|
||||
if (e.key === "Enter") llmSendBtn.click();
|
||||
llmInput.addEventListener("keydown", e => {
|
||||
if (e.key === "Enter") {
|
||||
e.preventDefault();
|
||||
document.getElementById("llmSendBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
openTabBtn.onclick = () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user