diff --git a/assets/js/theme/design-system/TouchControl.js b/assets/js/theme/design-system/TouchControl.js index 91d20b863107ddec18782d8280b0691169a8c9dc..e6b3788d0d810eeb566d56d44d65321f8e8d1453 100644 --- a/assets/js/theme/design-system/TouchControl.js +++ b/assets/js/theme/design-system/TouchControl.js @@ -120,27 +120,26 @@ osuny.TouchControl.prototype.onEnd = function (event) { } this.dispatch(event); - - this.clear(); }; osuny.TouchControl.prototype.dispatch = function (event) { var threshold = this.options.threshold.action; this.state.end = osuny.utils.getEventClientCoord(event); - + if (this.state.start.x > this.state.end.x + threshold) { this.parent.next(); } else if (this.state.start.x < this.state.end.x - threshold) { this.parent.previous(); } + this.clear(); + if (this.parent['release']) { this.parent.release(); } }; - osuny.TouchControl.prototype.preventClicks = function (event) { if (this.state.shouldPreventClicks && event.type === 'click') { event.preventDefault();