Skip to content

Commit

Permalink
use key event code SelectableMixin.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
nielslyngsoe authored Nov 19, 2024
1 parent 6b227bc commit a02fe74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/uui-base/lib/mixins/SelectableMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const SelectableMixin = <T extends Constructor<LitElement>>(
composePath.indexOf(this.selectableTarget) === 0
) {
if (this.selectableTarget === this) {
if (e.key !== ' ' && e.key !== 'Enter') return;
if (e.code !== 'Space' && e.code !== 'Enter') return;
this._toggleSelect();
e.preventDefault();
}
Expand Down

0 comments on commit a02fe74

Please sign in to comment.