From 3f0eaa5487f86a4e1810bff008fe71fea1e2c433 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 21 Jan 2025 12:35:02 +0100 Subject: [PATCH] fix(editor): make bubbling changes from outside work This partially reverts a change introduced in ca1384e3c9814525b7c0d460d4deba40f234d3ec which led to a bug where a comment on a task, which was just saved, stayed in the editor. The editor switched to read-only mode after that. --- .../src/components/input/editor/TipTap.vue | 23 +++++++------------ .../components/tasks/partials/Comments.vue | 1 - 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/frontend/src/components/input/editor/TipTap.vue b/frontend/src/components/input/editor/TipTap.vue index ebdb84352..0530df11b 100644 --- a/frontend/src/components/input/editor/TipTap.vue +++ b/frontend/src/components/input/editor/TipTap.vue @@ -184,13 +184,13 @@ import {setLinkInEditor} from '@/components/input/editor/setLinkInEditor' const { modelValue, uploadCallback, - isEditEnabled, - bottomActions, - showSave, - placeholder, - editShortcut, - enableDiscardShortcut, -} = withDefaults(defineProps<{ + isEditEnabled = true, + bottomActions = [], + showSave = false, + placeholder = '', + editShortcut = '', + enableDiscardShortcut = false, +} = defineProps<{ modelValue: string, uploadCallback?: UploadCallback, isEditEnabled?: boolean, @@ -199,14 +199,7 @@ const { placeholder?: string, editShortcut?: string, enableDiscardShortcut?: boolean, -}>(), { - isEditEnabled: true, - bottomActions: () => [], - showSave: false, - placeholder: '', - editShortcut: '', - enableDiscardShortcut: false, -}) +}>() const emit = defineEmits(['update:modelValue', 'save']) diff --git a/frontend/src/components/tasks/partials/Comments.vue b/frontend/src/components/tasks/partials/Comments.vue index 15a845ec3..f3aa84f46 100644 --- a/frontend/src/components/tasks/partials/Comments.vue +++ b/frontend/src/components/tasks/partials/Comments.vue @@ -158,7 +158,6 @@ !isCommentEdit, }" :upload-callback="attachmentUpload" - :upload-enabled="true" :placeholder="$t('task.comment.placeholder')" @save="addComment()" />