fix(kanban): don't allow dragging a bucket if a task input is focused
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
Resolves #2452
This commit is contained in:
parent
f967bcb205
commit
78b765ddc4
|
@ -24,7 +24,7 @@
|
||||||
@end="updateBucketPosition"
|
@end="updateBucketPosition"
|
||||||
@start="() => dragBucket = true"
|
@start="() => dragBucket = true"
|
||||||
group="buckets"
|
group="buckets"
|
||||||
:disabled="!canWrite"
|
:disabled="!canWrite || newTaskInputFocused"
|
||||||
tag="ul"
|
tag="ul"
|
||||||
:item-key="({id}) => `bucket${id}`"
|
:item-key="({id}) => `bucket${id}`"
|
||||||
:component-data="bucketDraggableComponentData"
|
:component-data="bucketDraggableComponentData"
|
||||||
|
@ -142,6 +142,7 @@
|
||||||
class="input"
|
class="input"
|
||||||
:disabled="loading || taskLoading || undefined"
|
:disabled="loading || taskLoading || undefined"
|
||||||
@focusout="toggleShowNewTaskInput(bucket.id)"
|
@focusout="toggleShowNewTaskInput(bucket.id)"
|
||||||
|
@focusin="() => newTaskInputFocused = true"
|
||||||
@keyup.enter="addTaskToBucket(bucket.id)"
|
@keyup.enter="addTaskToBucket(bucket.id)"
|
||||||
@keyup.esc="toggleShowNewTaskInput(bucket.id)"
|
@keyup.esc="toggleShowNewTaskInput(bucket.id)"
|
||||||
:placeholder="$t('list.kanban.addTaskPlaceholder')"
|
:placeholder="$t('list.kanban.addTaskPlaceholder')"
|
||||||
|
@ -294,6 +295,7 @@ export default defineComponent({
|
||||||
newTaskError: {},
|
newTaskError: {},
|
||||||
showSetLimitInput: false,
|
showSetLimitInput: false,
|
||||||
collapsedBuckets: {},
|
collapsedBuckets: {},
|
||||||
|
newTaskInputFocused: false,
|
||||||
|
|
||||||
// We're using this to show the loading animation only at the task when updating it
|
// We're using this to show the loading animation only at the task when updating it
|
||||||
taskUpdating: {},
|
taskUpdating: {},
|
||||||
|
@ -462,6 +464,7 @@ export default defineComponent({
|
||||||
|
|
||||||
toggleShowNewTaskInput(bucketId) {
|
toggleShowNewTaskInput(bucketId) {
|
||||||
this.showNewTaskInput[bucketId] = !this.showNewTaskInput[bucketId]
|
this.showNewTaskInput[bucketId] = !this.showNewTaskInput[bucketId]
|
||||||
|
this.newTaskInputFocused = false
|
||||||
},
|
},
|
||||||
|
|
||||||
async addTaskToBucket(bucketId) {
|
async addTaskToBucket(bucketId) {
|
||||||
|
|
Reference in New Issue