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