Clear textarea after sending

This commit is contained in:
2024-05-11 17:23:50 +02:00
parent 95a58f0f4b
commit af287b8f49
2 changed files with 14 additions and 4 deletions
+8 -2
View File
@@ -14,7 +14,7 @@
<button {% if not IsLogin or not HaveKey %}disabled{% endif %} type="submit"
class="send-button button is-primary is-small" hx-post="/requestMultipleMessages"
hx-swap="beforeend settle:200ms" hx-target="#chat-messages" id="chat-input-send-btn"
class="chat-input" hx-include="[name='message'], [name^='model-check-']">
class="chat-input" hx-include="[name='message'], [name^='model-check-']" onclick="clearTextArea()">
<span class="icon">
<i class="fa-solid fa-chevron-right"></i>
</span>
@@ -22,4 +22,10 @@
</div>
</div>
</div>
</div>
</div>
<script>
function clearTextArea() {
document.querySelector('.textarea').value = '';
}
</script>