diff --git a/src/components/input/editor.vue b/src/components/input/editor.vue index dfb14a49b..083776c4c 100644 --- a/src/components/input/editor.vue +++ b/src/components/input/editor.vue @@ -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) { diff --git a/src/components/tasks/partials/comments.vue b/src/components/tasks/partials/comments.vue index 0cfcb9303..848731b56 100644 --- a/src/components/tasks/partials/comments.vue +++ b/src/components/tasks/partials/comments.vue @@ -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() })