We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb1628d commit 07aa1bbCopy full SHA for 07aa1bb
packages/client/internals/NoteEditable.vue
@@ -94,6 +94,14 @@ function calculateEditorHeight() {
94
inputEl.value.style.height = `${inputEl.value.scrollHeight}px`
95
}
96
97
+function onKeyDown(e: KeyboardEvent) {
98
+ // Override save shortcut on editing mode
99
+ if (editing.value && e.metaKey && e.key === 's') {
100
+ e.preventDefault()
101
+ update({ note: note.value }, props.no)
102
+ }
103
+}
104
+
105
watch(
106
[note, editing],
107
() => {
@@ -129,5 +137,6 @@ watch(
129
137
:class="props.class"
130
138
:placeholder="placeholder"
131
139
@keydown.esc="editing = false"
140
+ @keydown="onKeyDown"
132
141
/>
133
142
</template>
0 commit comments