From e386fa7674d5678017e39e14bb8a513d45849e8a Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 25 Apr 2019 10:36:41 +0200 Subject: [PATCH] FIX: ensures we have touches when starting pan event (#7435) --- app/assets/javascripts/discourse/mixins/pan-events.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/mixins/pan-events.js.es6 b/app/assets/javascripts/discourse/mixins/pan-events.js.es6 index 423fb1c8a55..2b4dc4dd1e7 100644 --- a/app/assets/javascripts/discourse/mixins/pan-events.js.es6 +++ b/app/assets/javascripts/discourse/mixins/pan-events.js.es6 @@ -24,7 +24,7 @@ export default Ember.Mixin.create({ addTouchListeners($element) { if (this.site.mobileView) { $element - .on("touchstart", e => this._panStart(e.touches[0])) + .on("touchstart", e => e.touches && this._panStart(e.touches[0])) .on("touchmove", e => { const touchEvent = e.touches[0]; touchEvent.type = "pointermove";