Skip to content

Commit

Permalink
Touchcancel event cancels touch regardless of cancelled flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Ongion authored and mattyway committed Nov 17, 2024
1 parent c7dae49 commit f91e6f2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ class ActionHandler extends HTMLElement implements ActionHandlerType {

element.actionHandler.end = (ev: Event) => {
// Don't respond when moved or scrolled while touch
if (["touchend", "touchcancel"].includes(ev.type) && this.cancelled) {
if (
ev.type === "touchcancel" ||
(ev.type === "touchend" && this.cancelled)
) {
return;
}
const target = ev.target as HTMLElement;
Expand Down

0 comments on commit f91e6f2

Please sign in to comment.