Merge pull request #2856 from nextcloud/bugfix/2853/pressing-enter-again-sends-invisible-message

Pressing enter again re-sends last message
This commit is contained in:
Joas Schilling 2020-01-30 09:07:40 +01:00 коммит произвёл GitHub
Родитель 6645107f1c 92aeb14f95
Коммит 58315e6e4f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -181,7 +181,9 @@ export default {
},
watch: {
text(text) {
this.$emit('update:contentEditable', this.$refs.contentEditable.cloneNode(true))
this.$nextTick(() => {
this.$emit('update:contentEditable', this.$refs.contentEditable.cloneNode(true))
})
this.$emit('update:value', text)
this.$emit('input', text)

Просмотреть файл

@ -220,6 +220,7 @@ export default {
const temporaryMessage = this.createTemporaryMessage()
this.$store.dispatch('addTemporaryMessage', temporaryMessage)
this.text = ''
this.parsedText = ''
// Scrolls the message list to the last added message
this.$nextTick(function() {
document.querySelector('.scroller').scrollTop = document.querySelector('.scroller').scrollHeight