diff --git a/src/components/ui/VnNotes.vue b/src/components/ui/VnNotes.vue index e43130cf3..595ee2d19 100644 --- a/src/components/ui/VnNotes.vue +++ b/src/components/ui/VnNotes.vue @@ -20,7 +20,14 @@ const state = useState(); const currentUser = ref(state.getUser()); const newNote = ref(''); const vnPaginateRef = ref(); - +function handleKeyUp(event) { + if (event.key === 'Enter' && event.shiftKey) { + event.preventDefault(); + } else if (event.key === 'Enter') { + insert(); + event.preventDefault(); + } +} async function insert() { const body = $props.body; Object.assign(body, { text: newNote.value }); @@ -48,7 +55,7 @@ async function insert() { size="lg" autogrow autofocus - @keyup.enter.stop="insert" + @keyup="handleKeyUp" clearable >