Désactive le retour à la ligne après appui sur entrée
This commit is contained in:
parent
f2a5366281
commit
7a3ff3d5fd
@ -165,6 +165,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (event.key === 'Enter') {
|
if (event.key === 'Enter') {
|
||||||
|
event.preventDefault(); // Disallow adding a new line
|
||||||
sendMessage(chatInput.value);
|
sendMessage(chatInput.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -461,7 +462,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<textarea class="shadow form-control form-control-lg" rows="1"
|
<textarea class="shadow form-control form-control-lg" rows="1"
|
||||||
bind:this="{chatInput}"
|
bind:this="{chatInput}"
|
||||||
on:keyup={handleChatInputKey}
|
on:keydown={handleChatInputKey}
|
||||||
placeholder="Saisissez votre message ici..."
|
placeholder="Saisissez votre message ici..."
|
||||||
aria-label="Chat with AI"></textarea>
|
aria-label="Chat with AI"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user