Skip to content

Commit

Permalink
fix(button): prevent default on "space" based activations
Browse files Browse the repository at this point in the history
  • Loading branch information
Westbrook committed Mar 26, 2021
1 parent bc6f9b0 commit 708d587
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/button/src/ButtonBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export class ButtonBase extends LikeAnchor(
const { code } = event;
switch (code) {
case 'Space':
event.preventDefault();
if (typeof this.href === 'undefined') {
this.addEventListener('keyup', this.handleKeyup);
this.active = true;
Expand Down

0 comments on commit 708d587

Please sign in to comment.