#432 - prevent post status form textarea keydown event propagation
This commit is contained in:
parent
09736691ea
commit
3468c0fd04
2 changed files with 4 additions and 0 deletions
|
@ -222,6 +222,9 @@ const PostStatusForm = {
|
||||||
this.highlighted = 0
|
this.highlighted = 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onKeydown (e) {
|
||||||
|
e.stopPropagation()
|
||||||
|
},
|
||||||
setCaret ({target: {selectionStart}}) {
|
setCaret ({target: {selectionStart}}) {
|
||||||
this.caret = selectionStart
|
this.caret = selectionStart
|
||||||
},
|
},
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
ref="textarea"
|
ref="textarea"
|
||||||
@click="setCaret"
|
@click="setCaret"
|
||||||
@keyup="setCaret" v-model="newStatus.status" :placeholder="$t('post_status.default')" rows="1" class="form-control"
|
@keyup="setCaret" v-model="newStatus.status" :placeholder="$t('post_status.default')" rows="1" class="form-control"
|
||||||
|
@keydown="onKeydown"
|
||||||
@keydown.down="cycleForward"
|
@keydown.down="cycleForward"
|
||||||
@keydown.up="cycleBackward"
|
@keydown.up="cycleBackward"
|
||||||
@keydown.shift.tab="cycleBackward"
|
@keydown.shift.tab="cycleBackward"
|
||||||
|
|
Loading…
Reference in a new issue