autoscroll post form on typing + some minor improvements
This commit is contained in:
parent
7b4cb38734
commit
6f0257cd7d
3 changed files with 26 additions and 7 deletions
|
@ -211,10 +211,12 @@ const EmojiInput = {
|
|||
this.keepOpen = keepOpen
|
||||
this.$emit('input', newValue)
|
||||
const position = this.caret + (insertion + spaceAfter + spaceBefore).length
|
||||
if (!keepOpen) {
|
||||
this.input.elm.focus()
|
||||
}
|
||||
|
||||
this.$nextTick(function () {
|
||||
// Re-focus inputbox after clicking suggestion
|
||||
this.input.elm.focus()
|
||||
// Set selection right after the replacement instead of the very end
|
||||
this.input.elm.setSelectionRange(position, position)
|
||||
this.caret = position
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue