From 747a9fe505fd10c29f7a89d64bc1bb1d95db75d8 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 18 Apr 2021 16:50:12 +0200 Subject: [PATCH] Focus task detail elements when they show up --- src/components/input/multiselect.vue | 5 ++ .../tasks/partials/editAssignees.vue | 49 +++++++++++-------- src/views/tasks/TaskDetailView.vue | 2 +- 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/src/components/input/multiselect.vue b/src/components/input/multiselect.vue index 7498b9b0..38ce865b 100644 --- a/src/components/input/multiselect.vue +++ b/src/components/input/multiselect.vue @@ -3,6 +3,8 @@ class="multiselect" :class="{'has-search-results': searchResultsVisible}" ref="multiselectRoot" + tabindex="-1" + @focus="focus" >
@@ -324,6 +326,9 @@ export default { this.$emit('input', this.internalValue) this.$emit('remove', item) }, + focus() { + this.$refs.searchInput.focus() + }, }, } diff --git a/src/components/tasks/partials/editAssignees.vue b/src/components/tasks/partials/editAssignees.vue index 3d05df22..bb3f04cd 100644 --- a/src/components/tasks/partials/editAssignees.vue +++ b/src/components/tasks/partials/editAssignees.vue @@ -1,25 +1,31 @@ diff --git a/src/views/tasks/TaskDetailView.vue b/src/views/tasks/TaskDetailView.vue index 7943a6fb..dce929f1 100644 --- a/src/views/tasks/TaskDetailView.vue +++ b/src/views/tasks/TaskDetailView.vue @@ -654,7 +654,7 @@ export default { toggleTaskDone() { this.task.done = !this.task.done - if(this.task.done) { + if (this.task.done) { playPop() }