✨ Fix keybinding in chatting
This commit is contained in:
parent
4e4bc3345d
commit
0b24b7cc05
@ -67,8 +67,7 @@
|
||||
:max-rows="6"
|
||||
:loading="loading"
|
||||
v-model="data.content"
|
||||
@keyup.ctrl.enter="sendMessage"
|
||||
@keyup.meta.enter="sendMessage"
|
||||
@keydown="onEditorKeydown"
|
||||
@paste="pasteMedia"
|
||||
>
|
||||
<template #append>
|
||||
@ -161,6 +160,12 @@ async function sendMessage() {
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
function onEditorKeydown(event: KeyboardEvent) {
|
||||
if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === "enter") {
|
||||
sendMessage()
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => channels.related.messages.reply_to,
|
||||
(val) => {
|
||||
|
Reference in New Issue
Block a user