铸渊: 修复回车无法发送消息问题

This commit is contained in:
bingshuo 2026-05-18 21:28:04 +08:00
parent 26644c09a4
commit c6e6e3cb67

View File

@ -482,7 +482,13 @@
setInterval(updateSlotInfo, 30000);
// Keyboard shortcut: Escape to blur input
document.addEventListener('keydown', function(e) {
documenchatInput.addEventListener('keydown', function(e) {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
sendMessage();
}
});
chatInput.addEventListener('keydown', function(e) {
if (e.key === 'Escape' && document.activeElement === chatInput) {
chatInput.blur();
}