Skip to content

Commit

Permalink
Bugfix: Keyboard actions shift + click on checkbox doesn't trigger se… (
Browse files Browse the repository at this point in the history
#8993)

* Bugfix: Keyboard actions shift + click on checkbox doesn't trigger selection

* remove dev leftover
  • Loading branch information
lookacat authored May 8, 2023
1 parent eb8ce91 commit 01f555c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
:model-value="isResourceSelected(item)"
:outline="isLatestSelectedItem(item)"
@update:model-value="setSelection($event, item)"
@click.stop
@click.stop="fileClicked([item, $event])"
/>
</template>
<template #name="{ item }">
Expand Down Expand Up @@ -730,6 +730,7 @@ export default defineComponent({
const resource = data[0]
const eventData = data[1]
const isCheckboxClicked = eventData?.target.getAttribute('type') === 'checkbox'
const contextActionClicked = eventData?.target?.closest('div')?.id === 'oc-files-context-menu'
if (contextActionClicked) {
return
Expand All @@ -740,6 +741,9 @@ export default defineComponent({
if (eventData && eventData.shiftKey) {
return eventBus.publish('app.files.list.clicked.shift', resource)
}
if (isCheckboxClicked) {
return
}
return this.emitSelect([resource.id])
},
formatDate(date) {
Expand Down

0 comments on commit 01f555c

Please sign in to comment.