diff --git a/resources/js/components/feedback/FeedbackEditor.vue b/resources/js/components/feedback/FeedbackEditor.vue index 9030e246..600be82e 100644 --- a/resources/js/components/feedback/FeedbackEditor.vue +++ b/resources/js/components/feedback/FeedbackEditor.vue @@ -80,11 +80,21 @@ export default { }, onCreate: ({ editor }) => { let creating = true + + // Ensure editor is fully loaded before setting creating to false + editor.on('transaction', () => { + if (creating) { + this.$nextTick(() => {creating = false;}); + } + }); editor.on('update', ({editor, transaction}) => { + console.log('onUpdate bool creating:', creating) this.currentValue = editor.getJSON() this.$emit('input', this.currentValue) // onUpdate is also called while creating the editor, so filter that call out if (!this.isRemoteChange(transaction) && !creating) { + console.log('onUpdate bool creating:', creating) + this.$emit('localinput', this.currentValue) } creating = false