铸渊: 修复回车无法发送消息问题
This commit is contained in:
parent
26644c09a4
commit
c6e6e3cb67
@ -482,7 +482,13 @@
|
|||||||
setInterval(updateSlotInfo, 30000);
|
setInterval(updateSlotInfo, 30000);
|
||||||
|
|
||||||
// Keyboard shortcut: Escape to blur input
|
// 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) {
|
if (e.key === 'Escape' && document.activeElement === chatInput) {
|
||||||
chatInput.blur();
|
chatInput.blur();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user