Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #380 from studiokloek/patch-slider-event-bug
Browse files Browse the repository at this point in the history
Don't check slider position on mouseup or touchend events
  • Loading branch information
illright authored Mar 1, 2024
2 parents 845ef78 + 9d2c715 commit d2f47dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion attractions/slider/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
*/
function normalizeEvent(e) {
if (e.type.includes('touch')) {
return /** @type {TouchEvent}*/ (e).touches[0];
return (
/** @type {TouchEvent}*/ (e).touches[0] ||
/** @type {TouchEvent}*/ (e).changedTouches[0]
);
} else {
return /** @type {MouseEvent}*/ (e);
}
Expand Down

0 comments on commit d2f47dd

Please sign in to comment.