Allow ctrl+enter posting when focused on alt text

This commit is contained in:
Sol Fisher Romanoff 2022-07-14 22:36:14 +03:00
parent 28d5a55352
commit d480429896
No known key found for this signature in database
GPG key ID: 9D3F2B64F2341B62
2 changed files with 7 additions and 0 deletions

View file

@ -126,6 +126,9 @@ const Attachment = {
videoTag () {
return this.useModal ? 'button' : 'span'
},
statusForm () {
return this.$parent.$parent
},
...mapGetters(['mergedConfig'])
},
watch: {
@ -219,6 +222,9 @@ const Attachment = {
const newHeight = Math.floor(target.scrollHeight - padding * 2)
target.style.height = `${newHeight}px`
this.$emit('resize', newHeight)
},
postStatus (event) {
console.log(this.statusForm.postStatus(event, this.statusForm.newStatus))
}
}
}

View file

@ -255,6 +255,7 @@
:placeholder="$t('post_status.media_description')"
rows="1"
cols="1"
@keydown.ctrl.enter="postStatus()"
@input="resize"
/>
<p v-else>