Fix pasting text into task comments or task descriptions
This commit is contained in:
parent
ecefa3c892
commit
4d998d891e
2 changed files with 9 additions and 8 deletions
|
@ -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) {
|
||||
|
|
|
@ -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()
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue