Désactive le retour à la ligne après appui sur entrée

This commit is contained in:
Sylvain Philip 2024-09-16 23:32:39 +02:00
parent f2a5366281
commit 7a3ff3d5fd

View File

@ -165,6 +165,7 @@
}
if (event.key === 'Enter') {
event.preventDefault(); // Disallow adding a new line
sendMessage(chatInput.value);
}
}
@ -461,7 +462,7 @@
<div class="container">
<textarea class="shadow form-control form-control-lg" rows="1"
bind:this="{chatInput}"
on:keyup={handleChatInputKey}
on:keydown={handleChatInputKey}
placeholder="Saisissez votre message ici..."
aria-label="Chat with AI"></textarea>
</div>