fix: send on enter
This commit is contained in:
parent
f22d39ce29
commit
b214d76e93
@ -26,7 +26,7 @@
|
||||
:placeholder="placeholder"
|
||||
@focus="rows = 6"
|
||||
@blur="rows = 1"
|
||||
@keydown.meta.enter="sendWhatsAppMessage"
|
||||
@keydown.enter="(e) => sendTextMessage(e)"
|
||||
/>
|
||||
<div class="flex justify-end gap-2">
|
||||
<Button
|
||||
@ -72,6 +72,13 @@ function uploadFile(file) {
|
||||
sendWhatsAppMessage()
|
||||
}
|
||||
|
||||
function sendTextMessage(event) {
|
||||
if (event.shiftKey) return
|
||||
sendWhatsAppMessage()
|
||||
textarea.value.$el.blur()
|
||||
content.value = ''
|
||||
}
|
||||
|
||||
async function sendWhatsAppMessage() {
|
||||
let args = {
|
||||
reference_doctype: props.doctype,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user