diff --git a/src/components/tasks/gantt-chart.vue b/src/components/tasks/gantt-chart.vue index 056d71dce..861ed574c 100644 --- a/src/components/tasks/gantt-chart.vue +++ b/src/components/tasks/gantt-chart.vue @@ -46,7 +46,7 @@ v-model="newTaskTitle" /> - + {{ $t('task.new') }} @@ -195,13 +195,15 @@ const newTaskFieldActive = ref(false) const newTaskTitleField = ref() const newTaskTitle = ref('') -function showCreateNewTask() { +function showCreateTaskOrCreate() { if (!newTaskFieldActive.value) { // Timeout to not send the form if the field isn't even shown setTimeout(() => { newTaskFieldActive.value = true nextTick(() => newTaskTitleField.value.focus()) }, 100) + } else { + createTask() } }