diff options
| author | Shpuld Shpludson <shp@cock.li> | 2019-03-10 15:29:44 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2019-03-10 15:29:44 +0000 |
| commit | 841648676ce4b523916c573e158c9a3934adffb7 (patch) | |
| tree | 6ac223600777c2bc437d149513038b8c2a68783d /src | |
| parent | 09736691ea79e66c9e41d6f723384769088eb2d0 (diff) | |
| parent | 3468c0fd042544c28c5b24fd3fe4048114046957 (diff) | |
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 (limited to 'src')
| -rw-r--r-- | src/components/post_status_form/post_status_form.js | 3 | ||||
| -rw-r--r-- | src/components/post_status_form/post_status_form.vue | 1 |
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 index 23a2c7e2..1f0df35a 100644 --- 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 index 0ddde4ea..3d1df91b 100644 --- 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" |
