Merge branch 'issue-432-dot-key' into 'develop'

#432 - prevent post status form textarea keydown event propagation

Closes #432

See merge request pleroma/pleroma-fe!658
This commit is contained in:
Shpuld Shpludson 2019-03-10 15:29:44 +00:00
commit 841648676c
2 changed files with 4 additions and 0 deletions

View file

@ -222,6 +222,9 @@ const PostStatusForm = {
this.highlighted = 0
}
},
onKeydown (e) {
e.stopPropagation()
},
setCaret ({target: {selectionStart}}) {
this.caret = selectionStart
},

View file

@ -20,6 +20,7 @@
ref="textarea"
@click="setCaret"
@keyup="setCaret" v-model="newStatus.status" :placeholder="$t('post_status.default')" rows="1" class="form-control"
@keydown="onKeydown"
@keydown.down="cycleForward"
@keydown.up="cycleBackward"
@keydown.shift.tab="cycleBackward"