Skip to content

Commit

Permalink
fix hold check on touchpad end handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerwyn committed Dec 9, 2024
1 parent 958237f commit ca4dc76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/universal-remote-card.min.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/classes/remote-touchpad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ export class RemoteTouchpad extends BaseRemoteElement {
if ('targetTouches' in e && e.targetTouches?.length) {
this.hold = true;
}
} else if (!('targetTouches' in e) || !e.targetTouches.length) {
} else if (
!this.hold ||
!('targetTouches' in e) ||
!e.targetTouches.length
) {
this.onClick(e);
}
this.toggleRipple();
Expand Down

0 comments on commit ca4dc76

Please sign in to comment.