From 0d3e55c9e3d67210df3395c3f6e4d4a062eb8779 Mon Sep 17 00:00:00 2001 From: ebolam Date: Wed, 7 Sep 2022 12:28:39 -0400 Subject: [PATCH] Fix for enter on input submitting --- static/koboldai.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/koboldai.js b/static/koboldai.js index 29284221..a76016d0 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -3094,8 +3094,9 @@ function detect_enter_submit(e) { } else { e.cancelBubble = true; } - document.getElementById("btnsend").onclick(); - document.getElementById('input_text').value = '' + console.log("submitting"); + document.getElementById("btnsubmit").onclick(); + setTimeout(function() {document.getElementById('input_text').value = '';}, 1); } }