logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe
commit: 841648676ce4b523916c573e158c9a3934adffb7
parent: 09736691ea79e66c9e41d6f723384769088eb2d0
Author: Shpuld Shpludson <shp@cock.li>
Date:   Sun, 10 Mar 2019 15:29:44 +0000

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

Diffstat:

Msrc/components/post_status_form/post_status_form.js3+++
Msrc/components/post_status_form/post_status_form.vue1+
2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js @@ -222,6 +222,9 @@ const PostStatusForm = { this.highlighted = 0 } }, + onKeydown (e) { + e.stopPropagation() + }, setCaret ({target: {selectionStart}}) { this.caret = selectionStart }, diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue @@ -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"