Skip to content

Commit

Permalink
fix: toggling checkboxes via enter key
Browse files Browse the repository at this point in the history
Follow-up of #11312: fixes all checkboxes in Web by adjusting the `OcCheckbox` component. The enter press event did not set any value, which was the issue.
  • Loading branch information
JammingBen committed Aug 1, 2024
1 parent 8c3aabf commit 909c717
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Bugfix: Toggling checkboxes via keyboard

Toggling checkboxes via the keyboard enter key in the resources table has been fixed and does now work.
Toggling checkboxes via the keyboard enter key has been fixed and does now work.

https://github.com/owncloud/web/pull/11312
https://github.com/owncloud/web/pull/11315
https://github.com/owncloud/web/issues/10730
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:class="classes"
:value="option"
:disabled="disabled"
@keydown.enter="$emit('click', $event)"
@keydown.enter="keydownEnter"
/>
<label :for="id" :class="labelClasses" v-text="label" />
</span>
Expand Down Expand Up @@ -133,6 +133,12 @@ export default defineComponent({
}
return this.model.some((m) => isEqual(m, this.option))
}
},
methods: {
keydownEnter(event: KeyboardEvent) {
this.model = !this.model
this.$emit('click', event)
}
}
})
</script>
Expand Down

0 comments on commit 909c717

Please sign in to comment.