Fix pasting text into task comments or task descriptions
continuous-integration/drone/push Build is failing Details

This commit is contained in:
kolaente 2021-04-25 17:34:49 +02:00
parent ecefa3c892
commit 4d998d891e
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 9 additions and 8 deletions

View File

@ -253,14 +253,17 @@ export default {
this.$nextTick(this.renderPreview)
},
text(newVal, oldVal) {
if (oldVal === '') {
// Only bubble the new value if it actually changed, but not if the component just got mounted and the text changed from the outside.
if (oldVal === '' && this.text === this.value) {
return
}
this.bubble()
},
},
beforeMount() {
this.text = this.value
mounted() {
if (this.value !== '') {
this.text = this.value
}
if (this.previewIsDefault && this.hasPreview) {
this.$nextTick(this.renderPreview)
@ -293,7 +296,7 @@ export default {
this.changeTimeout = setTimeout(() => {
this.$emit('input', this.text)
this.$emit('change')
this.$emit('change', this.text)
}, timeout)
},
replaceAt(str, index, replacement) {

View File

@ -168,9 +168,7 @@ export default {
name: 'comments',
components: {
editor: () => ({
component: import(
/* webpackChunkName: "editor" */ '../../input/editor'
),
component: import(/* webpackChunkName: "editor" */ '../../input/editor'),
loading: LoadingComponent,
error: ErrorComponent,
timeout: 60000,
@ -233,7 +231,7 @@ export default {
loadComments() {
this.taskCommentService
.getAll({taskId: this.taskId})
.then((r) => {
.then(r => {
this.$set(this, 'comments', r)
this.makeActions()
})