From b778c76cbd90b2eace5063a94fd0083b2a65aa8a Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 15 Jan 2021 23:47:14 +0100 Subject: [PATCH] Fix task title heading ux --- src/components/tasks/partials/heading.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/tasks/partials/heading.vue b/src/components/tasks/partials/heading.vue index cf79f902c..ac10fd51e 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 }