diff --git a/src/components/tasks/TaskDetailView.vue b/src/components/tasks/TaskDetailView.vue
index e21f944c..eb1bdd84 100644
--- a/src/components/tasks/TaskDetailView.vue
+++ b/src/components/tasks/TaskDetailView.vue
@@ -163,7 +163,15 @@
-
+
@@ -319,6 +327,7 @@
namespace: NamespaceModel,
showDeleteModal: false,
taskTitle: '',
+ descriptionChanged: false,
priorities: priorites,
flatPickerConfig: {
@@ -450,6 +459,22 @@
this.task.done = !this.task.done
this.saveTask()
},
+ setDescriptionChanged(e) {
+ if (e.key === 'Enter' || e.key === 'Control') {
+ return
+ }
+ this.descriptionChanged = true
+ },
+ saveTaskIfDescriptionChanged() {
+ // We want to only save the description if it was changed.
+ // Since we can either trigger this with ctrl+enter or @change, it would be possible to save a task first
+ // with ctrl+enter and then with @change although nothing changed since the last save when @change gets fired.
+ // To only save one time we added this method.
+ if(this.descriptionChanged) {
+ this.descriptionChanged = false
+ this.saveTask()
+ }
+ },
},
}