Skip to content

Commit

Permalink
fix(button): include "pointerleave" in management of the "active" state
Browse files Browse the repository at this point in the history
  • Loading branch information
Westbrook Johnson authored and Westbrook committed Feb 26, 2021
1 parent c7bacc0 commit 2e702e4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/button/src/ButtonBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,14 @@ export class ButtonBase extends LikeAnchor(
if (this.active) {
this.addEventListener('focusout', this.handleRemoveActive);
this.addEventListener('pointerup', this.handleRemoveActive);
this.addEventListener('pointerleave', this.handleRemoveActive);
} else {
this.removeEventListener('focusout', this.handleRemoveActive);
this.removeEventListener('pointerup', this.handleRemoveActive);
this.removeEventListener(
'pointerleave',
this.handleRemoveActive
);
}
}
if (this.anchorElement) {
Expand Down

0 comments on commit 2e702e4

Please sign in to comment.