FIX: ensures we have touches when starting pan event (#7435)

This commit is contained in:
Joffrey JAFFEUX 2019-04-25 10:36:41 +02:00 committed by GitHub
parent d8ff94ecaa
commit e386fa7674
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ export default Ember.Mixin.create({
addTouchListeners($element) { addTouchListeners($element) {
if (this.site.mobileView) { if (this.site.mobileView) {
$element $element
.on("touchstart", e => this._panStart(e.touches[0])) .on("touchstart", e => e.touches && this._panStart(e.touches[0]))
.on("touchmove", e => { .on("touchmove", e => {
const touchEvent = e.touches[0]; const touchEvent = e.touches[0];
touchEvent.type = "pointermove"; touchEvent.type = "pointermove";