diff --git a/src/components/tasks/partials/heading.vue b/src/components/tasks/partials/heading.vue index cf79f902..ac10fd51 100644 --- a/src/components/tasks/partials/heading.vue +++ b/src/components/tasks/partials/heading.vue @@ -11,11 +11,9 @@ class="title input" :class="{'disabled': !canWrite}" @focusout="save()" - @keyup.ctrl.enter="save()" + @keydown.enter.prevent.stop="save()" :contenteditable="canWrite ? 'true' : 'false'" - ref="taskTitle"> - {{ task.title }} - + ref="taskTitle">{{ task.title.trim() }} @@ -78,6 +76,7 @@ export default { // we're building it ourselves and only calling saveTask() // if the task title changed. if (this.task.title !== this.taskTitle) { + this.$refs.taskTitle.blur() this.saveTask() this.taskTitle = taskTitle }